Laravel - Mail - Configuring The View
Within a mailable class' build
method, you may use the view
method to specify which template should be used when rendering the email's contents. Since each email typically uses a Blade template to render its contents, you have the full power and convenience of the Blade templating engine when building your email's HTML:
/**
* Build the message.
*
* @return $this
*/
public function build()
{
return $this->view('emails.orders.shipped');
}
You may wish to create aresources/views/emails
directory to house all of your email templates; however, you are free to place them wherever you wish within yourresources/views
directory.