diff --git a/src/Illuminate/Mail/Mailable.php b/src/Illuminate/Mail/Mailable.php index 7e47f06a030d..c92e497c675d 100644 --- a/src/Illuminate/Mail/Mailable.php +++ b/src/Illuminate/Mail/Mailable.php @@ -294,6 +294,18 @@ public function render() }); } + /** + * Render the mailable into a view and display it, then halt execution. + * + * @throws \ReflectionException + */ + public function dd() + { + header('Content-Type: text/html; charset=UTF-8'); + echo $this->render(); + exit(1); + } + /** * Build the view for the message. *