Skip to content

Instantly share code, notes, and snippets.

@ahsankhatri
Created August 9, 2018 08:30
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ahsankhatri/c7ddd9927e400d113f19516b85892be3 to your computer and use it in GitHub Desktop.
Save ahsankhatri/c7ddd9927e400d113f19516b85892be3 to your computer and use it in GitHub Desktop.
Preview Mailable in Browser Laravel 5.4
Route::get('/preview-mail', function () {
$mail = (new \App\Mail\ShareItenraryTripStarted())->build();
$mocked = new \ReflectionMethod($mail, 'buildView');
$mocked->setAccessible(true);
return $mocked->invoke($mail)['html'];
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment