Я использую Laravel версии 5.7.20 для создания пользовательского шаблона уценки. Шаблон копируется из /resources/views/vendor/notifications/email.blade.php
, который создается после выполнения команды php artisan vendor:publish --tag=laravel-notifications
.
Следующие работы отображают HTML:
return (new MailMessage)
->line(new HtmlString('The <strong>introduction</strong> to the notification.'))
->line('The <strong>introduction</strong> to the notification.')
->line(new HtmlString('Due Date: <strong>' . Carbon::parse($this->info->created_at)->format('Y-m-d H:i') . '</strong>'))
->line('Due Date: <strong>' . Carbon::parse($this->info->created_at)->format('Y-m-d H:i') . '</strong>')
->action('Notification Action', url('/'));
Это не работает. Который использует мою собственную уценку
return (new MailMessage)
->line(new HtmlString('The <strong>introduction</strong> to the notification.'))
->line('The <strong>introduction</strong> to the notification.')
->line(new HtmlString('Due Date: <strong>' . Carbon::parse($this->info->created_at)->format('Y-m-d H:i').'</strong>'))
->line('Due Date: <strong>' . Carbon::parse($this->info->created_at)->format('Y-m-d H:i').'</strong>')
->action('Notification Action', url('/'))
->markdown('mail.notification.permission');
мой файл mail.notification.permission копируется точно из laravel-project/resources/views/vendor/notifications/email.blade.php
Думаю, мне нужен просмотр, а не уценка. Но я меняю ->view('mail.notification.permission');
у меня ошибка No hint path defined for [mail]. (View: /Users/shiro/Sites/laravel-project/resources/views/mail/notification/permission.blade.php)
какой файл я должен скопировать, чтобы использовать html, а не формат разметки.
Я не вижу решения в использовании уведомлений ->view вместо ->markdown. Или как правильно отображать html в уведомлении по электронной почте?
MailMessage
? - person Mike Harrison   schedule 16.01.2019