📅  最后修改于: 2022-03-11 14:54:38.190000             🧑  作者: Mango
protected function unauthenticated($request, AuthenticationException $exception)
{
if ($request->expectsJson()) {
return response()->json(['error' => 'Unauthenticated.'], 401);
}
return redirect()->guest('/');
}