Richard Carlos
Richard Carlos

Reputation: 13

Password recovery in laravel

I am facing the following problem with the password reset, I did all the correct configuration and I am the Postmark to reset the password, and locally everything works fine, the problem and when it goes up to the server and the following error appears:

Illuminate\Database\QueryException: SQLSTATE[HY000]: General error: 1364 Field 'id' doesn't have a default value (SQL: insert into `password_resets` (`email`, `token`, `created_at`) values ([email protected], $2y$10$0KSaAg13p5yWwEJTrKiFAeraitpjGgRV/GLbe3t2kW9qt7Nt5sajW, 2020-05-25 15:48:22)) in file /var/www/api.aqbank.com.br/vendor/laravel/framework/src/Illuminate/Database/Connection.php on line 671

Controller

    class ForgotPasswordController extends Controller
    {
    use SendsPasswordResetEmails;



    protected function sendResetLinkResponse(Request $request, $response)
    {
        return response (['message'=>$response]);
    }



    protected function sendResetLinkFailedResponse(Request $request, $response)
    {
        return response(['error'=>$response], 422);
    }


}

Do you know how to tell me where I might be missing?

Upvotes: 0

Views: 86

Answers (1)

JoeGalind
JoeGalind

Reputation: 3815

Seems as if your password_resets has an 'id' column. That table normally does not use an id column. Remove it and give it a try.

Upvotes: 1

Related Questions