prabina sht
prabina sht

Reputation: 217

Time of response taking too long time - Laravel 6 Api

I'm building a laravel API, and I'm testing my requests from Postman. Simple request taking a too long time to get some response(about 132061 ms) and it returns blank. Anyone have any idea what be happening? enter image description here

   public function register(Request $request)
{
    $request->validate([
        'name' => 'required|string',
        'email' => 'required|string|email|unique:users',
        'password' => 'required|string|confirmed'
    ]);
 
    return response()->json([
        'message' => 'Successfully created user!'
    ], 201);
}

Upvotes: 0

Views: 771

Answers (1)

jiedevm
jiedevm

Reputation: 33

You set the password to be confirmed in the rules for validation, but the confirmation field doesn't appear in your request. Try again after you removed the 'confirmed' rule from the rules or add 'password_confirmation' with same value as password field to your request

Upvotes: 1

Related Questions