File tree Expand file tree Collapse file tree 3 files changed +10
-2
lines changed
Expand file tree Collapse file tree 3 files changed +10
-2
lines changed Original file line number Diff line number Diff line change 1717 "illuminate/contracts" : " ^9.21|^10.0|^11.0|^12.0|^13.0" ,
1818 "illuminate/queue" : " ^9.21|^10.0|^11.0|^12.0|^13.0" ,
1919 "illuminate/support" : " ^9.21|^10.0|^11.0|^12.0|^13.0" ,
20+ "laravel/sentinel" : " ^1.0" ,
2021 "nesbot/carbon" : " ^2.17|^3.0" ,
2122 "ramsey/uuid" : " ^4.0" ,
2223 "symfony/console" : " ^6.0|^7.0|^8.0" ,
2627 },
2728 "require-dev" : {
2829 "mockery/mockery" : " ^1.0" ,
29- "orchestra/testbench" : " ^7.55 |^8.36 |^9.15 |^10.8 |^11.0" ,
30+ "orchestra/testbench" : " ^7.56 |^8.37 |^9.16 |^10.9 |^11.0" ,
3031 "phpstan/phpstan" : " ^1.10|^2.0" ,
3132 "predis/predis" : " ^1.1|^2.0|^3.0"
3233 },
Original file line number Diff line number Diff line change 88use Illuminate \Support \Facades \Route ;
99use Illuminate \Support \ServiceProvider ;
1010use Laravel \Horizon \Connectors \RedisConnector ;
11+ use Laravel \Sentinel \Http \Middleware \SentinelMiddleware ;
1112
1213class HorizonServiceProvider extends ServiceProvider
1314{
@@ -20,6 +21,11 @@ class HorizonServiceProvider extends ServiceProvider
2021 */
2122 public function boot ()
2223 {
24+ Route::middlewareGroup ('horizon ' , [
25+ SentinelMiddleware::class.':horizon ' ,
26+ ...config ('horizon.middleware ' , ['web ' ]),
27+ ]);
28+
2329 $ this ->normalizeConfig ();
2430 $ this ->registerEvents ();
2531 $ this ->registerRoutes ();
@@ -71,7 +77,7 @@ protected function registerRoutes()
7177 'domain ' => config ('horizon.domain ' , null ),
7278 'prefix ' => config ('horizon.path ' ),
7379 'namespace ' => 'Laravel\Horizon\Http\Controllers ' ,
74- 'middleware ' => config ( 'horizon.middleware ' , ' web ' ) ,
80+ 'middleware ' => 'horizon ' ,
7581 ], function () {
7682 $ this ->loadRoutesFrom (__DIR__ .'/../routes/web.php ' );
7783 });
Original file line number Diff line number Diff line change 11providers :
22 - Laravel\Horizon\HorizonServiceProvider
3+ - Laravel\Sentinel\SentinelServiceProvider
34 - Workbench\App\Providers\HorizonServiceProvider
45
56env :
You can’t perform that action at this time.
0 commit comments