generated from liutk/owl-admin-base
admin store-device.deposit
parent
5e3e4d9772
commit
f94b78d83f
|
|
@ -54,7 +54,7 @@ class Handler extends ExceptionHandler
|
||||||
protected function unauthenticated($request, AuthenticationException $exception)
|
protected function unauthenticated($request, AuthenticationException $exception)
|
||||||
{
|
{
|
||||||
return $this->shouldReturnJson($request, $exception)
|
return $this->shouldReturnJson($request, $exception)
|
||||||
? response()->json(['code' => Response::HTTP_UNAUTHORIZED, 'message' => $exception->getMessage()], 401)
|
? response()->json(['code' => Response::HTTP_UNAUTHORIZED, 'message' => '请先登录'], 401)
|
||||||
: redirect()->guest($exception->redirectTo() ?? route('login'));
|
: redirect()->guest($exception->redirectTo() ?? url('/'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue