diff --git a/src/ZiggyServiceProvider.php b/src/ZiggyServiceProvider.php index 8e99e9f9..dd7496a9 100644 --- a/src/ZiggyServiceProvider.php +++ b/src/ZiggyServiceProvider.php @@ -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 "generate({$group}); ?>"; - }); + $this->app['blade.compiler']->directive('routes', function ($group) { + return "generate({$group}); ?>"; }); if ($this->app->runningInConsole()) {