I've upgraded my laravel instance from version 5.6 to version 5.7. Now I try to use the built-in email verification from laravel.
My problem is that I don't get an email after successful registration when I use the "resend" function the email arrives.
What is the problem?
I had this exactly same problem. That is default code from Laravel.
In order to send the email after successful registration you can do this workaround:
at App\Http\Controllers\Auth\RegisterController
change this:
protected function create(array $data)
{
return User::create([
'name' => $data['name'],
'email' => $data['email'],
'password' => Hash::make($data['password']),
]);
}
to this:
protected function create(array $data)
{
$user = User::create([
'name' => $data['name'],
'email' => $data['email'],
'password' => Hash::make($data['password']),
]);
$user->sendEmailVerificationNotification();
return $user;
}