From 7f8e1a4f950c3ddb403a62bbea778705c0a4f57b Mon Sep 17 00:00:00 2001 From: Neil Jennings Date: Mon, 30 Sep 2019 16:28:49 +0100 Subject: [PATCH] Update CmsServiceProvider.php --- src/CmsServiceProvider.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/CmsServiceProvider.php b/src/CmsServiceProvider.php index 19b292f..b4dca13 100644 --- a/src/CmsServiceProvider.php +++ b/src/CmsServiceProvider.php @@ -38,16 +38,17 @@ public function boot(Router $router, Kernel $kernel) UploadChecks::class ]; $routerMiddleware = [ - 'coaster.admin' => AdminAuth::class, - 'coaster.guest' => GuestAuth::class, - 'coaster.secure_upload' => SecureUpload::class, + 'coaster.cms' => [], + 'coaster.admin' => [AdminAuth::class], + 'coaster.guest' => [GuestAuth::class], + 'coaster.secure_upload' => [SecureUpload::class], ]; event(new LoadMiddleware($globalMiddleware, $routerMiddleware)); foreach ($globalMiddleware as $globalMiddlewareClass) { $kernel->pushMiddleware($globalMiddlewareClass); } foreach ($routerMiddleware as $routerMiddlewareName => $routerMiddlewareClass) { - $router->middlewareGroup($routerMiddlewareName, [$routerMiddlewareClass]); + $router->middlewareGroup($routerMiddlewareName, $routerMiddlewareClass); } // use coater guard and user provider