Skip to content

Commit

Permalink
reset state between requests (#415)
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell authored Apr 2, 2021
1 parent 735e95a commit 58f3a2f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/ZiggyServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@

namespace Tightenco\Ziggy;

use Illuminate\Support\Facades\Event;
use Illuminate\Support\ServiceProvider;
use Illuminate\View\Compilers\BladeCompiler;
use Laravel\Octane\Events\RequestReceived;

class ZiggyServiceProvider extends ServiceProvider
{
Expand All @@ -17,6 +19,10 @@ public function boot()
});
}

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

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

0 comments on commit 58f3a2f

Please sign in to comment.