Conditionally pushing event listeners to queue
Here’s the situation, you’re building an online store that should handle thousands of orders every day, one of the cool things about this store is that customers who make purchases above 10K should receive a gift coupon, let’s see how we can implement such thing in laravel: On every new purchase a NewPurchase event is dispatched, we can easily setup as much listeners as we want to this event from within our EventServiceProvider: class EventServiceProvider Read more