LoginController
now uses AuthenticatesUsers
trait directly. And there is (still) sendFailedLoginResponse(Request $request)
method, which you should override and return the response you want. It'll be something like:
/**
* Get the failed login response instance.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
protected function sendFailedLoginResponse(Request $request)
{
return response()->json([
'error' => 'Credentials do not match, try again.'
], 406);
}
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community