Reputation: 737
I just upgraded from 5.6 to 5.7 and followed the instructions precisely. When registration happens, the email is not sending immediately. However, it works when clicking on the the message to resend it. Is it actually a feature to send the email at the point of registration? or Do I need to manually add a function.
Upvotes: 1
Views: 827
Reputation: 8750
I checked the source, it seems it doesn't get dispatched upon registration automatically. However, you can easily change that behavior.
In app\Http\Controllers\Auth\RegisterController
, your create()
method should look like this. This should work, assuming that you have followed all the other steps documented here.
/**
* Create a new user instance after a valid registration.
*
* @param array $data
* @return \App\User
*/
protected function create(array $data)
{
$user = User::create([
'name' => $data['name'],
'email' => $data['email'],
'password' => Hash::make($data['password']),
]);
$user->sendEmailVerificationNotification();
return $user;
}
Upvotes: 1