parent
fb2909a1c7
commit
6409fffdad
22 changed files with 143 additions and 166 deletions
|
@ -20,11 +20,7 @@ class Authenticate
|
|||
public function handle(Request $request, Closure $next)
|
||||
{
|
||||
if (! $request->user()) {
|
||||
if ($request->ajax() || $request->expectsJson()) {
|
||||
throw new AuthenticationException();
|
||||
} else {
|
||||
return redirect()->route('auth.login');
|
||||
}
|
||||
throw new AuthenticationException;
|
||||
}
|
||||
|
||||
return $next($request);
|
||||
|
|
Reference in a new issue