mirror of
https://github.com/archtechx/laravel-tips.git
synced 2025-12-12 05:14:04 +00:00
726 B
726 B
| title | tweet_id | thread_slug | author_username | images | created_at | slug | |
|---|---|---|---|---|---|---|---|
| Create Subscribers to listen to & handle multiple events using separate methods, inside a single class | 1498010791303282688 | weekly-thread-2022-08 | bobbybouwmann |
|
2022-02-27T19:02:58+00:00 | create-subscribers-to-listen-to-amp-handle-multiple-events-using-separate-methods-inside-a-single-class |
Did you know that you can create a "Subscriber" class in Laravel to handle multiple events with different methods in one Listener class?
This is very useful if you want to group certain actions with the same dependencies.
Documentation: https://laravel.com/docs/9.x/events#event-subscribers