I'm attempting to customise the mail components that Laravel ships with, in particular the markdown components. I've followed the docs (5.7) as best I can, and there seems to be a bit of the puzzle missing. I'll use the docs examples to explain the scenario:
To create my mailable and the markdown template I do:
php artisan make:mail OrderShipped --markdown=emails.orders.shipped
This creates a mailable which has the build() function:
public function build()
{
return $this->markdown('emails.orders.shipped');
}
It also creates a the blade view in views/emails/orders/shipped.blade.php with this in it:
@component('mail::message')
# Introduction
The body of your message.
@component('mail::button', ['url' => ''])
Button Text
@endcomponent
Thanks,<br>
{{ config('app.name') }}
@endcomponent
In that view I change "Button Text" to "Click Me". I then render the email source with this route:
use App\Mail\OrderShipped;
Route::get('/testemail', function () {
return (new OrderShipped)->render();
});
I see the email with default styling, but the button text is changed. Brilliant.
The problem:
Now I want to customise the scaffolding of that email, the layout and colours etc. So following the docs I run php artisan vendor:publish --tag=laravel-mail and get a load of blade views generated in views/vendor/mail/html and views/vendor/mail/markdown.
As a test I want to remove the link in the header of the email. I find this template in views/vendor/mail/html/header.blade.php:
<tr>
<td class="header">
<a href="{{ $url }}">
{{ $slot }}
</a>
</td>
</tr>
I remove the link so it looks like:
<tr>
<td class="header">
{{ $slot }}
</td>
</tr>
...save the file, and re-load my rendered email. Nothing has changed. What am I doing wrong?
I can't see or deduce any more steps needed from the docs. Any help you can give will be appreciated!