@msslgomez try <img src="{{ asset('images/logo.png') }}" alt="logo" />
Mar 20, 2020
4
Level 9
How to add logo to Default Laravel Mail Template
I have published the laravel-mail in order to be able to change the default mail templates and I want to add a logo or picture to the header but I've been unsuccessful. This is what I've tried in the views/vendor/mail/html/header.blade.php. Both ways I've tried show nothing it's just empty and I get two 500 Server Errors, how can I do this?
<tr>
<td class="header">
<img src="{{asset('public/images/logo.png')}}" alt=""/>
<img src="../../../../../public/image/logo.png" alt="">
</td>
</tr>
Right now I'm sending the email like this is the routes only to be able to see it in order to change what I want
Route::get('/email', function () {
Mail::to('[email protected]')->send(new WelcomeMail());
return new WelcomeMail();
});
This is how I would send this particular email (welcome email)
Mail::to($dbUser->email)->send(new WelcomeMail());
I creating a Mail Class called WelcomeMail where it has the default setup
class WelcomeMail extends Mailable
{
use Queueable, SerializesModels;
public function __construct()
{
//
}
public function build()
{
return $this->markdown('emails.welcome');
}
}
Level 53
Please or to participate in this conversation.