0

所以我正在使用 Laravel 通知发送邮件。这可能是一个非常简单的问题,但我找不到任何答案。当我检查电子邮件中的邮件时,标题部分或我不知道如何描述它总是标签:“示例”。我应该添加什么来更改该标签“示例”?

public function toMail($notifiable)
    {
        return (new MailMessage)
                    ->greeting('New Password')
                    ->subject('New Password - zzz')
                    ->line('Keep your password safe, and have fun!')
                    ->line('Your new password is ' . $this->password)
                    ->line('Thank you for using our application!');
    }

看起来像 :

示例“gotl.and.gotl@gmail.com”

4

2 回答 2

1

您需要更新您的设置。这些来自config/mail.php. 您可能需要在.env文件中添加或更新它们。

于 2018-08-21T19:56:00.743 回答
0

您应该在控制台中运行:

php artisan vendor:publish  

然后选择lluminate\Notifications\NotificationServiceProvider(假设您使用的是最新的 Laravel 版本之一)

结果你应该得到:

Copied Directory [/vendor/laravel/framework/src/Illuminate/Notifications/resources/views] To [/resources/views/vendor/notifications]
Publishing complete.

然后您可以查看/resources/views/vendor/notifications/email.blade.php文件内容。

于 2018-08-21T19:55:18.717 回答