Skip to content

Commit

Permalink
Removed unnecessary else
Browse files Browse the repository at this point in the history
  • Loading branch information
kamaroly authored Jul 9, 2016
1 parent 98ca59d commit e3bd984
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions app/Http/Middleware/Authenticate.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,8 @@ public function handle($request, Closure $next, $guard = null)
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);
Expand Down

0 comments on commit e3bd984

Please sign in to comment.