如何在 laravel 中的重置密码电子邮件中包含徽标
How to include Logo in Reset password email in laravel
我正在尝试自定义重设密码 blade。
到目前为止,
我已将此代码放入 User.php 模型中。
public function sendPasswordResetNotification($token)
{
$this->notify(new ResetPasswordNotification($token));
}
并且,
php artisan make:notification MyOwnResetPassword
我使用此命令发布自定义通知
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.');
}
问题是如何添加Logo?
任何帮助或参考都将非常有用
谢谢
在文档中 (https://laravel.com/docs/5.3/notifications#mail-notifications) 它说您的新 MailMessage 正在发送格式化的消息。
您还可以自定义模板:
in the resources/views/vendor/notifications directory
您可能需要先 运行 该命令:php artisan vendor:publish --tag=laravel-notifications
您可以在此处查看所有文档:https://laravel.com/docs/5.3/notifications#customizing-the-templates
我正在尝试自定义重设密码 blade。
到目前为止,
我已将此代码放入 User.php 模型中。
public function sendPasswordResetNotification($token)
{
$this->notify(new ResetPasswordNotification($token));
}
并且,
php artisan make:notification MyOwnResetPassword 我使用此命令发布自定义通知
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.');
}
问题是如何添加Logo?
任何帮助或参考都将非常有用
谢谢
在文档中 (https://laravel.com/docs/5.3/notifications#mail-notifications) 它说您的新 MailMessage 正在发送格式化的消息。
您还可以自定义模板:
in the resources/views/vendor/notifications directory
您可能需要先 运行 该命令:php artisan vendor:publish --tag=laravel-notifications
您可以在此处查看所有文档:https://laravel.com/docs/5.3/notifications#customizing-the-templates