Skip to main content
Back to packages
481 GitHub stars

Xammie/mailbook

View on GitHub

Description

Package that lets you easily inspect your mails without having to actually trigger it in your application.

The mailbook:install command will create a route file named routes/mailbook.php. In this file you can register your emails.

// This will use dependency injection if your mailable has parameters
Mailbook::add(VerificationMail::class);
 
// Use a closure to customize the parameters of the mail instance
Mailbook::add(function (): VerificationMail {
$user = User::factory()->make();
 
return new VerificationMail($user, '/example/url')
});

Next head over to /mailbook to preview the mailables.

We'd Love Your Feedback

Tell us what you like or what we can improve

Feel free to share anything you like or dislike about this page or the platform in general.