mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-19 06:43:45 +02:00
@@ -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 New Issue
Block a user