I'm using Laravel 5.4, I'm sending a Markdown mailable with the following code:
public function build()
{
return $this->markdown('emails.userWasRegistered')
->with('user', $this->user);
}
markdown
@component('mail::message')
# Welcome
Thank you for registering, you are registered as a {{ $user->role }}
@component('mail::button', ['url' => $url])
Login
@endcomponent
@endcomponent
But the output isn't what it's supposed to be, right?
HTML
HTML source
Any idea what might be going wrong?
I know what's going on. It's because you indented your template. In markdown when you indent something that's interpreted as a "code-block", which should be displayed as-is instead of computed, if you know what I mean.
like this you <strong>see</strong>?
So just don't indent your code.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With