|
13 | 13 | use Illuminate\Queue\Events\Looping; |
14 | 14 | use Illuminate\Queue\Events\WorkerStopping; |
15 | 15 | use Illuminate\Routing\Router; |
| 16 | +use Illuminate\Support\Facades\Route; |
16 | 17 | use Illuminate\Support\ServiceProvider; |
17 | 18 | use Illuminate\Support\Str; |
18 | 19 | use Illuminate\View\Compilers\BladeCompiler; |
|
24 | 25 | use Laravel\Pulse\Ingests\RedisIngest; |
25 | 26 | use Laravel\Pulse\Ingests\StorageIngest; |
26 | 27 | use Laravel\Pulse\Storage\DatabaseStorage; |
| 28 | +use Laravel\Sentinel\Http\Middleware\SentinelMiddleware; |
27 | 29 | use Livewire\LivewireManager; |
28 | 30 | use RuntimeException; |
29 | 31 |
|
@@ -73,6 +75,11 @@ public function boot(): void |
73 | 75 | $this->app->make(Pulse::class)->stopRecording(); |
74 | 76 | } |
75 | 77 |
|
| 78 | + Route::middlewareGroup('pulse', [ |
| 79 | + SentinelMiddleware::class.':pulse', |
| 80 | + ...$this->app->make('config')->get('pulse.middleware', []), |
| 81 | + ]); |
| 82 | + |
76 | 83 | $this->registerAuthorization(); |
77 | 84 | $this->registerRoutes(); |
78 | 85 | $this->registerComponents(); |
@@ -101,7 +108,7 @@ protected function registerRoutes(): void |
101 | 108 | $router->group([ |
102 | 109 | 'domain' => $app->make('config')->get('pulse.domain', null), |
103 | 110 | 'prefix' => $app->make('config')->get('pulse.path'), |
104 | | - 'middleware' => $app->make('config')->get('pulse.middleware'), |
| 111 | + 'middleware' => 'pulse', |
105 | 112 | ], function (Router $router) { |
106 | 113 | $router->get('/', function (Pulse $pulse, ViewFactory $view) { |
107 | 114 | return $view->make('pulse::dashboard'); |
|
0 commit comments