igaster / laravel-theme

Theme support for Laravel
MIT License
520 stars 113 forks source link

Mail view namespace not found in theme #55

Closed benswinburne closed 7 years ago

benswinburne commented 7 years ago

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.

igaster commented 7 years ago

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

benswinburne commented 7 years ago

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

igaster commented 7 years ago

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

benswinburne commented 7 years ago

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

igaster commented 7 years ago

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.