Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

waffl's avatar
Level 2

Mailables in 9.x - Build vs Content etc? Is documentation out of sync?

I'm a bit confused why php artisan make:mail OrderShipped creates a file that's different from the documentation which states Once you have generated a mailable class, open it up so we can explore its contents. Mailable class configuration is done in several methods, including the envelope, content, and attachments methods.

Instead, the result is a class that extends Mailable with __construct and build functions, and build is not mentioned in the documentation. I'm just wondering how to customize the mail template as it has the preexisting laravel header/footer and links.

0 likes
2 replies
Sinnbeck's avatar
Sinnbeck
Best Answer
Level 102

Sounds like you are not using the latest version 9

Run composer update

2 likes
waffl's avatar
Level 2

Arg of course, I had Laravel 9.x in my composer.json but had done the update on my desktop and not on my laptop 🙈

Thank you!

Please or to participate in this conversation.