Skip to content

Commit

Permalink
Fix @route Blade not working on some env (issue #115)
Browse files Browse the repository at this point in the history
  • Loading branch information
darron1217 committed Feb 8, 2018
1 parent f7b0377 commit 4d990f3
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 4d990f3

Please sign in to comment.