mercredi 13 mars 2019

What do the markdown vendor files do for mailables?

I'm using laravel with markdown emails.

return $this->from('test@test.com', 'test')
   ->subject($this->subject)
   ->markdown('emails.test');

I published the vendor files into my repository by running:

php artisan vendor:publish --tag=laravel-mail

That gave me the views/vendor/mail/html folder and the views/vendor/mail/markdown folder.

I'm not sure what the files in the markdown folder are doing. Most of these files only contain a little bit of code. i.e.

markdown/header.php

 

When I delete my emails don't render any differently. I can delete any content in any of these files and nothing changes. I do however have to make sure these files exist.

I want to use these files to put markdown content that's static across all my emails. Currently the only way I can achieve this is to put that content in the views/vendor/mail/html directory.

How can I have static content written in markdown in my mailables?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire