asahasrabuddhe / laravel-mjml

Easily use MJML in your Laravel Blade templates!
MIT License
122 stars 51 forks source link

<mj-include> doesn't work because of relative paths #141

Open tennox opened 1 year ago

tennox commented 1 year ago

I can't use relative includes

<mj-include path="./_template.mjml" />

the MJML command is run on the file

/app/storage/framework/views/96c..817.mjml.php

but the includes are in relative to the view file in

/app/resources/views/emails/view-name.blade.php

(side question: Is there a better option than using .blade.php as extension? .mjml.blade.php did not work)

tennox commented 1 year ago

Could be easily 'worked around' with https://github.com/asahasrabuddhe/laravel-mjml/issues/142

But I would suggest adding --config.filePath= option automatically to make it work out of the box.

I have provided a PR for this: #143

maximepvrt commented 10 months ago

@asahasrabuddhe you can close this merge request ;-)