version laravel5.4
I specified two channels in the via method, namely, the database and the mail. Everything is normal when the database is inserted, and there is no problem with sending the mail. But why did this format output in the form of source code? I thought it was the problem of the foxmail client. I tried to log in to the web version of the mailbox and found that the format was the same. Did you encounter the same problem?
public function via($notifiable)
{
return ["database", "mail"];
}
public function toMail($notifiable)
{
$url = url("/summaries/" . $this->summary->id);
return (new MailMessage)
->subject($this->summary->user->name . "". $this->summary->title ."")
->line($this->summary->user->name . "". $this->summary->title ."")
->action("", $url);
}