Laravel Breeze comes with Auth email templates, but what if you want to customize them? In this tutorial, we will add the user's name to the reset password email, which isn't shown by default.

First, we need to create a new Notification class which we will use to send a reset password email.
php artisan make:notification ResetPasswordNotification
Now we need to set that Laravel would use our just created notification. This can be done in the User Model within the sendPasswordResetNotification method.
You can read more about
Reset Email Customizationin the official documentation.
app/Models/User.php:
use App\Notifications\ResetPasswordNotification; class User extends Authenticatable{ // ... public function sendPasswordResetNotification($token): void { $this->notify(new ResetPasswordNotification($token)); }}
Here, we pass the token.
Next, the notification itself.
app/Notifications/ResetPasswordNotification.php:
class ResetPasswordNotification extends Notification{ public function __construct(public readonly string $token) {} public function via($notifiable): array { return ['mail']; } public function toMail($notifiable): MailMessage { return (new MailMessage) ->subject(Lang::get('Reset Password Notification')) ->greeting(Lang::get('Hello') . ' ' . $notifiable->name . ',') ->line(Lang::get('You are receiving this email because we received a password reset request for your account.')) ->action(Lang::get('Reset Password'), $this->resetUrl($notifiable)) ->line(Lang::get('This password reset link will expire in :count minutes.', ['count' => config('auth.passwords.'.config('auth.defaults.passwords').'.expire')])) ->line(Lang::get('If you did not request a password reset, no further action is required.')); } protected function resetUrl(mixed $notifiable): string { return url(route('password.reset', [ 'token' => $this->token, 'email' => $notifiable->getEmailForPasswordReset(), ], false)); }}
The message is taken from the original notification which can be found here. The resetUrl method is also taken from the same original notification. The only new thing here is we set a new greeting message. The greeting part is where by default Laravel adds Hello. Here we do Hello, Users Name.
The main thing here is $notifiable variable. It contains the object of who are we sending notification to. In our case (and in most default use-cases), it's a User model object.
Thank you so much. But then, what if I want to use my custom template?
Then you don't use the default functionality at all and create your own custom Mailable which would use your custom template.
I need to try that this week