independent full stack developer

/ Developer's blog

Laravel 5.4 markdown email doesn't render HTML

Thursday, November 21, 2024

If you ever stumbled with question why your markdown email in Laravel doesn't render properly, you have to know - that you need to remove any tabs/spaces before lines, so if you like to press CTRL+ALT+L and format your template pretty, be aware that it will broke your mail template :)

Be sure that your template looks like this.

@component('mail::message')
# Invoice Paid

Your invoice has been paid!

@component('mail::button', ['url' => ''])
View Invoice
@endcomponent

Thanks,
{{ config('app.name') }}
@endcomponent

 

3986 people already saw it