update JSON error message
This commit is contained in:
@@ -52,7 +52,7 @@ class Handler extends ExceptionHandler
|
||||
protected function unauthenticated($request, AuthenticationException $exception)
|
||||
{
|
||||
return $request->expectsJson()
|
||||
? response()->json(['error' => 'Unauthenticated.'], 401)
|
||||
? response()->json(['message' => 'Unauthenticated.'], 401)
|
||||
: redirect()->guest(route('login'));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user