Customizing a Mail
template can be time-consuming, especially when you have to send a
The best way to render your mail on your browser is to keep refreshing the browser as you change the template. This method is effortless and straightforward.
This should only be done while testing.
Run this command:
php artisan make:mail UserRegisteredMail –markdown emails.user-email
An email directory in the app directory which contains: UserRegisteredMail.php
An email directory in the view directory which contains: user-email.blade.php
In order to render it in your browser, you have to create a route
. Let’s try a /email
route with a get
method such as this:
Route::get(‘/email’, function(){
return new UserRegisteredMail();
});
Rendering a mail in the browser is time-saving and it allows you to know what your end-users receive when an email has been sent to them.