From 15ad0f786089bd628f9c0a16ed5231e1c3117f19 Mon Sep 17 00:00:00 2001 From: Kipjr <12066560+Kipjr@users.noreply.github.com> Date: Sun, 9 Jul 2023 10:39:21 +0000 Subject: [PATCH] Fix class naming issue --- app/Http/Controllers/MensaAdminController.php | 2 +- app/Http/Kernel.php | 2 +- app/Http/Middleware/IsAdmin.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Http/Controllers/MensaAdminController.php b/app/Http/Controllers/MensaAdminController.php index 8ce82a82..633bb06c 100644 --- a/app/Http/Controllers/MensaAdminController.php +++ b/app/Http/Controllers/MensaAdminController.php @@ -22,7 +22,7 @@ class MensaAdminController extends MensaCookController public function __construct() { parent::__construct(); - $this->middleware('isAdmin'); + $this->middleware('IsAdmin'); } public function showLogs(Request $request, $mensaId){ diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php index baeb66c7..ba96b225 100644 --- a/app/Http/Kernel.php +++ b/app/Http/Kernel.php @@ -59,6 +59,6 @@ class Kernel extends HttpKernel 'can' => \Illuminate\Auth\Middleware\Authorize::class, 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class, 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class, - 'isAdmin' => \App\Http\Middleware\isAdmin::class, + 'IsAdmin' => \App\Http\Middleware\IsAdmin::class, ]; } diff --git a/app/Http/Middleware/IsAdmin.php b/app/Http/Middleware/IsAdmin.php index dc4429c4..a941f4e2 100644 --- a/app/Http/Middleware/IsAdmin.php +++ b/app/Http/Middleware/IsAdmin.php @@ -5,7 +5,7 @@ use Closure; use Illuminate\Support\Facades\Auth; -class isAdmin +class IsAdmin { /** * Handle an incoming request.