update JSON error message

This commit is contained in:
Mohamed Said
2017-05-25 09:48:50 +02:00
parent 11dfcf6d1a
commit ef5bfb1dae

View File

@@ -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'));
}
}