Php Laravel通知邮件主题不工作
我收到用户通知:Php Laravel通知邮件主题不工作,php,laravel,Php,Laravel,我收到用户通知: public function toMail($notifiable) { return (new MailMessage) ->subject('Test email subject') ->greeting('Hello!'); } 当我打电话时: $user->notify(new UserNotify()) 一切都好。给我发电子邮件。但主题不会改变。在主题中总是示例为什么 在
public function toMail($notifiable)
{
return (new MailMessage)
->subject('Test email subject')
->greeting('Hello!');
}
当我打电话时:
$user->notify(new UserNotify())
一切都好。给我发电子邮件。但主题不会改变。在主题中总是
示例为什么 在Mailable类中,在build方法中,当您准备邮件时,可以传递主题:
/**
* Build the message.
*
* @return $this
*/
public function build()
{
return $this->view('email')
->subject('Test email subject');
}
请共享整个通知类。特别是,它是通过工作队列发送的吗?(hasuse illumb\Bus\Queueable;
trait/implementsShouldQueue
?)然后在代码更改后,您可能必须重新启动工作程序。