From 29e7aacb12295c61f1945754dade6e614fc42f9a Mon Sep 17 00:00:00 2001 From: "Ramon J. A. Smit" Date: Mon, 2 Mar 2020 15:48:24 +0100 Subject: [PATCH] Update CheckRole.php --- src/Http/Middleware/CheckRole.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Http/Middleware/CheckRole.php b/src/Http/Middleware/CheckRole.php index bcfea30..3532063 100644 --- a/src/Http/Middleware/CheckRole.php +++ b/src/Http/Middleware/CheckRole.php @@ -18,7 +18,7 @@ public function handle($request, Closure $next, $permission) if(!$request->user()->hasRole($permission)) { - return redirect()->route('cms.dashboard')->withError('You do not have the role '. $permission); + return redirect()->back()->withError('You do not have the role '. $permission); } return $next($request);