Support the ongoing development of →
Authentication Requests Validation
Last updated 2 years ago.

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!


Your banner here too?

aberrant aberrant Joined 15 Sep 2016


We'd like to thank these amazing companies for supporting us

Your logo here?

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 - All rights reserved.