igaster/laravel-theme

Mail view namespace not found in theme

Closed this issue · 5 comments

Laravel replaces the mail namespace and seems to have its own concept of themes for mail for markdown emails. From config/mail.php

'markdown' => [
        'theme' => 'default',

        'paths' => [
            resource_path('views/vendor/mail'),
        ],
],

Laravel's MailServiceProvider publishes to views/vendor/mail.

When using say mail::message to use views/$theme/vendor/mail/markdown/message.blade.php I can only use the ones in views/vendor/mail/markdown/; the package seems unable to find ones for the theme.

Hello @benswinburne, it seems that Laravel has a special bahaviour when rendering mail templates. A new major version of the package will be released in the next days with many new features. I'll address this issue in this release and probably pach this version too so that you can composer update safely

Hi @igaster did the 2.x release resolve this?

Hi @benswinburne, yes 2.0 will handle mail templates. Please read the migration guide if you are planing to migrate...

This does appear to work in the 2.x branch, thanks.

Just added a short documentation: https://github.com/igaster/laravel-theme/wiki/10.-Markdown-email-templates

I hope this explains how email views should be created.