Skip to content

Commit

Permalink
Merge pull request #3 from tightenco/dc-minor-fixes-before-release
Browse files Browse the repository at this point in the history
Make myriad minor fixes before release.
  • Loading branch information
DanielCoulbourne authored Aug 4, 2017
2 parents 8320950 + 2f1090b commit d5e6966
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Ziggy creates a Blade directive which you can include in your views. This will e

2. (if Laravel 5.4) Add `Tightenco\Ziggy\ZiggyServiceProvider::class` to the `providers` array in your `config/app.php`.

3. Include our Blade Directive (`@jsroutes`) somewhere in your template before your main application JavaScript is loaded--likely in the header somewhere.
3. Include our Blade Directive (`@routes`) somewhere in your template before your main application JavaScript is loaded--likely in the header somewhere.

## Usage

Expand Down
4 changes: 2 additions & 2 deletions src/BladeRouteGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public function generate()

return <<<EOT
<script type="text/javascript">
var namedRoutes = JSON.parse('{ $routes }');
var namedRoutes = JSON.parse('$routes');
function route (name, params) {
return namedRoutes[name].uri.replace(
Expand All @@ -36,7 +36,7 @@ function (tag) {
private function nameKeyedRoutes()
{
return collect($this->router->getRoutes()->getRoutesByName())->map(function ($route) {
return collect($route)->only(['uri', 'methods', 'parameters']);
return collect($route)->only(['uri', 'methods']);
});
}
}

0 comments on commit d5e6966

Please sign in to comment.