After a long break from laravel (last time I used it was around version 5.7), I recently got back into because of more free time.
I noticed there was a relatively new package called Fortify which allows you to scaffold the authentication process, it seemed pretty useful; however after diving deep into it, I realized that after registering a new user and sending an email verification there would be blocking request for a few seconds so it was obvious to me that the email verification was in fact not being queued.
I'm gonna start with a clean laravel 8 project and add fortify to it
composer require laravel/fortify
If we go into the user model there's a method called
sendEmailVerificationNotification() which we can actually override to modify how fortify sends the email verification notification.
In order to override we first have to make a new notification that will implement the
ShouldQueue Interface, and extend the
VerifyEmail notification that is provided by Fortify.
To create a new notification we can just use laravel's built in php artisan helper.
php artisan make:notification VerifyEmailQueued
After creating the notification we should make it extend
VerifyEmail and implement the
The notification class should look like this:
class VerifyEmailQueued extends VerifyEmail implements ShouldQueue
* Create a new notification instance.
* @return void
public function __construct()
* Get the array representation of the notification.
* @param mixed $notifiable
* @return array
public function toArray($notifiable)
Now there's one more thing left to do and it's overriding the
sendEmailVerificationNotification() method in the User model
User.php and add the following method:
public function sendEmailVerificationNotification()
Now there's one more thing left to do and it's running the artisan command to listen for jobs and queue them up.
php artisan queue:work
If everything is working correctly you should see that the VerifyEmailQueued notification should be processed and an email should be sent to the User. It will look something like this in the terminal: