Support the ongoing development of Laravel.io →
posted 8 years ago
Queues

I'm using the following code to have an event run in the background (sending emails)

class SendEmailToRegisteredUser implements ShouldQueue
{

    public function handle(UserWasRegistered $event)
    {
        Mail::to($event->user)->send(new UserWasRegisteredMail($event->user));
    }
}

This is working fine, it's looping through my list of employees, sending them mails. Now I'm wondering

I have a status icon next to each employee, which should turn green when the email is sent, do queues have a callback? Can I green these up once the mail is gone?

Thank you!

Last updated 3 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

notflip notflip Joined 2 Sep 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.