Решение:
В классе LoginController:
/* Send the response after the user was authenticated.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
protected function sendLoginResponse(Request $request) {
$this->clearLoginAttempts($request);
return response()->json(['SUCCESS' => 'AUTHENTICATED'], 200);
}
/**
* Get the failed login response instance.
*
* @return \Illuminate\Http\Response
*/
protected function sendFailedLoginResponse() {
return response()->json(['ERROR' => 'AUTH_FAILED'], 401);
}
/**
* Error after determining they are locked out.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
protected function sendLockoutResponse(Request $request) {
$seconds = $this->limiter()->availableIn(
$this->throttleKey($request)
);
return response()->json(['ERROR' => 'TOO_MANY_ATTEMPTS', 'WAIT' => $seconds], 401);
}