Skip to content

Instantly share code, notes, and snippets.

@ahsankhatri
Created August 9, 2018 09:31
Show Gist options
  • Save ahsankhatri/8d55c1eb3875f8857fc32060d24bbb21 to your computer and use it in GitHub Desktop.
Save ahsankhatri/8d55c1eb3875f8857fc32060d24bbb21 to your computer and use it in GitHub Desktop.
Preview Notifications (Email) in Browser Laravel 5.4
Route::get('/preview-mail', function () {
$user = User::first();
$mail = (new \App\Notifications\Api\Registration($user))->toMail('random@domain.com');
$markdown = new \Illuminate\Mail\Markdown(view(), config('mail.markdown'));
return $markdown->render('vendor.notifications.email', $mail->toArray());
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment