The notification class generated by laravel using make:notification cannot define the title in the message content.

clipboard.png

it is mentioned in the laravel document:

{Note:} when sending mail notifications, make sure that the value of name is set in the configuration file config/app.php, which will be used in the header and tail of the mail notification message.

but when I change the APP_NAME parameter in .env, the message title still says "Laravel"

.
public function toMail($notifiable)
{
    return (new MailMessage)
                ->subject($this->summary->user->name . "". $this->summary->title ."")
                ->markdown("emails.summaries.publish", ["summary" => $this->summary]);
}
Jun.29,2022
Menu