In the last lesson, I showed you the ShouldQueue
implementation on the notification email notification. Now let's explore other classes that can use queues in Laravel to further improve your application's performance.
What are Other Queueable Classes?
What other classes can have ShouldQueue
in Laravel? There are four results if we go to the Laravel documentation and search for ShouldQueue
. One of them is just about queues in general. But three more classes can be queueable. We saw notifications in a previous lesson. Also, event listeners and mails.
Let's try the other two approaches - events with listeners and emails - to implement the same functionality we did previously.
Events and Listeners Class
Laravel fires a Registered
event when a user registers and is created. This is a perfect opportunity to implement...