简体   繁体   中英

How to include Logo in Reset password email in laravel

I am trying to customize reset password blade.

So far,

I have put this code in User.php model.

public function sendPasswordResetNotification($token)
{
    $this->notify(new ResetPasswordNotification($token));
}

And,

php artisan make:notification MyOwnResetPassword I used this command to publish custom notification

public function toMail($notifiable)
{

    return (new MailMessage)
                ->subject('Reset Password')
                ->line('You are receiving this email because we received a password reset request for your account.')
                ->action('Reset Password', url('admin/password/reset/'.$this->token, false))
                ->line('If you did not request a password reset, no further action is required.');
} 

The question is how to add a Logo?

Any help or reference would be great

Thanks

In the documentation ( https://laravel.com/docs/5.3/notifications#mail-notifications ) It says that your new MailMessage is sending a formatted message.

Also you can customize your template :

in the resources/views/vendor/notifications directory

You probably need to run that command before : php artisan vendor:publish --tag=laravel-notifications

You can see all the documentation here : https://laravel.com/docs/5.3/notifications#customizing-the-templates

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM