laravel-mjml icon indicating copy to clipboard operation
laravel-mjml copied to clipboard

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

Open tennox opened this issue 2 years ago • 2 comments

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 avatar Oct 10 '22 12:10 tennox

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

tennox avatar Oct 10 '22 12:10 tennox

@asahasrabuddhe you can close this merge request ;-)

maximepvrt avatar Oct 02 '23 09:10 maximepvrt