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!
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community