Customizing Notifications with markdown
create a copy of the default.css
in resources/views/vendor/mail/html/themes
. Something like custom.css
If you don't have vendor
directory, consider to publish the laravel-mail
tag:
php artisan vendor:publish --tag=laravel-mail
In your Notification change the css with the theme method:
public function toMail($notifiable)
{
return (new MailMessage)
->theme('custom')
->subject('Demo Subject')
->markdown('mail.invoice.paid', ['url' => $url]);
}
Customizing auth mails
While generating the auth using make:auth
, it will generate the required views in the resources/view/auth
folder.
The files will have the corresponding layouts tag
<x-guest-layout>
{{-- some content --}}
</x-guest-layout>
...
You can customize the guest-layout
from the resources/views/layouts/guest.blade.php
or create a new custom.blade.php
file and change the tags in your mail templates:
<x-custom-layout>
{{-- some content --}}
</x-custom-layout>