Just a head: in addition to the previous answer, there are additional steps if you want to change the notification lines, for example You are receiving this...
etc. The following is a step-by-step guide.
You will need to override the default sendPasswordResetNotification
default sendPasswordResetNotification
of User
.
Why? Because strings are pulled from Illuminate\Auth\Notifications\ResetPassword.php
. Changing it in the kernel means that your changes will be lost during the Laravel update.
To do this, add the following to your User
model.
use App\Notifications\PasswordReset;
Finally, create this notification :
php artisan make:notification PasswordReset
And an example of this notification content:
public $token; public function __construct($token) { $this->token = $token; } public function via($notifiable) { return ['mail']; } public function toMail($notifiable) { return (new MailMessage) ->line('You are receiving this email because we received a password reset request for your account.')
source share