6 months ago

Events -> Listeners vs Handler

Posted 6 months ago by TuffRivers

I am created an event, UserCreated, which will fire a welcome email. Ive seen a few different tutorials, some say create and event and a listener, then the listener will trigger an email. But ont he laravel 7x documentation, it says to use event and a event handler?

Which is better for my use cause? I just want a simple way to que the job so my user can create an account and close our the connection while the send email can run in the background.

Previously ive done this with a dispatch and a job, just not sure what is the best for this use case or the differences between these three methods.


Please sign in or create an account to participate in this conversation.