如何在laravel中重置密码电子邮件中包含徽标

时间:2017-07-03 08:51:16

标签: php laravel laravel-5.3

我正在尝试自定义重置密码刀片。

到目前为止,

我已将此代码放在User.php模型中。

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

php artisan make:通知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.');
} 

问题是如何添加徽标?

任何帮助或参考都会很棒

由于

1 个答案:

答案 0 :(得分:0)

在文档中(https://laravel.com/docs/5.3/notifications#mail-notifications)它表示您的新MailMessage正在发送格式化消息。

您也可以自定义模板:

  资源/ views / vendor / notifications目录中的

您可能需要在php artisan vendor:publish --tag=laravel-notifications

之前运行该命令

您可以在此处查看所有文档:https://laravel.com/docs/5.3/notifications#customizing-the-templates