Specify a different mail theme for Notifications
Where to place a custom mail theme in Laravel
Last updated
Was this helpful?
Where to place a custom mail theme in Laravel
Last updated
Was this helpful?
Views can use something called Hints to tell the framework where to look for the view file. The theme always uses a hint of Mail::
which corresponds to the resources/views/vendor/mail/html
folder. What if we want to locate our theme somewhere else?
We can define our own hint and bind it into the system in the AppServiceProvider
with;
With this, we are saying that any view file that is hinted with appmail::
is found in the views/mail
folder.
Then, in the Notification, add the hint in the theme function;