Skip to content

Commit

Permalink
Merge pull request #724 from tighten/fix-event-listener
Browse files Browse the repository at this point in the history
Fix event listener propagation
  • Loading branch information
bakerkretzmar authored Mar 5, 2024
2 parents 3600edd + 2695c2a commit f3a9b0b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/ZiggyServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ public function boot()
$this->app->afterResolving('blade.compiler', fn (BladeCompiler $blade) => $this->registerDirective($blade));
}

Event::listen(RequestReceived::class, fn () => BladeRouteGenerator::$generated = false);
Event::listen(RequestReceived::class, function () {
BladeRouteGenerator::$generated = false;
});

if ($this->app->runningInConsole()) {
$this->commands(CommandRouteGenerator::class);
Expand Down

0 comments on commit f3a9b0b

Please # to comment.