@jarcas Can you share your markdown view file (mail.invoice.paid)?
Also, ensure your Markdown components are aligned without leading spaces or tabs!
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I'm using Laravel 10 (I know, I'm working on updating) and for some reason emails sent from any notification that use markdown don't have any contents in the email other than the theme's layout - the view specified in the method doesn't show up. This is true for both an existing markdown notification email, and a brand new one.
To test, I ran
php artisan make:notification InvoicePaid --markdown=mail.invoice.paid
The InvoicePaid.php file's mail method:
public function toMail($notifiable)
{
return (new MailMessage)->markdown('mail.invoice.paid');
}
And then added a route:
Route::get("/sendtestemail", function () {
$user = \App\Models\User::find(1);
$user->notify(new \App\Notifications\InvoicePaid());
});
And it does the same thing.
My config/mail.php:
'markdown' => [
'theme' => 'default',
'paths' => [
resource_path('views/vendor/mail'),
resource_path('views/vendor/mail/html'),
resource_path('views'),
],
],
I'm at my wit's end here, what's going on? The notification gets added to the database correctly when using toDatabase, but toMail's markdown method just doesn't work right. The email gets sent, but it's just the theme's layout and the view specified ("mail.invoice.paid") doesn't get included.
Please or to participate in this conversation.