Preview Laravel Notifications in Browser

Many times you may like to preview your email notifications in the browser for testing because it becomes a very time taking Job to send an actual email and resolve the HTML issues in your email.

Here is how you can preview your Laravel email notifications in the browser and adjust the template easily.

$notification = (new NotificationClass())->toMail('sample@example.com');
$markdown = new \Illuminate\Mail\Markdown(view(), config('mail.markdown'));
 return $markdown->render($notification->markdown, $notification->data());

Leave a Reply

Your email address will not be published. Required fields are marked *

Get a Quote

Give us a call or fill in the form below and we will contact you. We endeavor to answer all inquiries within 24 hours on business days.