Browse Source

Removed unnecessary else

Kamaro Lambert 8 years ago
parent
commit
e3bd984b01
1 changed files with 2 additions and 3 deletions
  1. 2 3
      app/Http/Middleware/Authenticate.php

+ 2 - 3
app/Http/Middleware/Authenticate.php

@@ -20,9 +20,8 @@ class Authenticate
         if (Auth::guard($guard)->guest()) {
             if ($request->ajax() || $request->wantsJson()) {
                 return response('Unauthorized.', 401);
-            } else {
-                return redirect()->guest('login');
-            }
+            } 
+            return redirect()->guest('login');
         }
 
         return $next($request);