]> BookStack Code Mirror - bookstack/blobdiff - app/Http/Middleware/CheckGuard.php
respective book and chapter structure added.
[bookstack] / app / Http / Middleware / CheckGuard.php
index cc73ea68d36cdf438e184f0cfdbd2da489bebf52..adc1d1f3ec0ab4a9b7e3044b56e021a52f0e1453 100644 (file)
@@ -9,9 +9,10 @@ class CheckGuard
     /**
      * Handle an incoming request.
      *
-     * @param  \Illuminate\Http\Request  $request
-     * @param  \Closure  $next
-     * @param string $allowedGuards
+     * @param \Illuminate\Http\Request $request
+     * @param \Closure                 $next
+     * @param string                   $allowedGuards
+     *
      * @return mixed
      */
     public function handle($request, Closure $next, ...$allowedGuards)
@@ -19,6 +20,7 @@ class CheckGuard
         $activeGuard = config('auth.method');
         if (!in_array($activeGuard, $allowedGuards)) {
             session()->flash('error', trans('errors.permission'));
+
             return redirect('/');
         }