Skip to content

Commit

Permalink
Merge pull request #127 from darron1217/issue#115
Browse files Browse the repository at this point in the history
Fix @routes Blade not working on some env (issue #115)
  • Loading branch information
DanielCoulbourne authored Feb 12, 2018
2 parents f7b0377 + 4d990f3 commit cbb8d86
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/ZiggyServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,8 @@ public function boot()
return Macro::whitelist($this, $group);
});

$this->app->afterResolving('blade.compiler', function (BladeCompiler $bladeCompiler) {
$bladeCompiler->directive('routes', function ($group) {
return "<?php echo app('" . BladeRouteGenerator::class . "')->generate({$group}); ?>";
});
$this->app['blade.compiler']->directive('routes', function ($group) {
return "<?php echo app('" . BladeRouteGenerator::class . "')->generate({$group}); ?>";
});

if ($this->app->runningInConsole()) {
Expand Down

0 comments on commit cbb8d86

Please sign in to comment.