- Events provide a simple observer implementation, allowing you to subscribe and listen for various events that occur in your application.
- Events are classes that can be fired from anywhere in your application.
- An event class will usually be bound to one, or many Events Listeners Classes or has those Listeners registered to listen to it.
- "fire" is the term that is usually used to call an Event.
- Events can be fired from Actions and or Tasks. It's preferable to choose one place only. (Tasks are recommended).
- Events SHOULD be created inside the Containers. However, general Events CAN be created in the Ship layer.
- Event classes CAN be placed inside the Containers in Events folders or on the Ship for the general Events.
- All Events MUST extend from
In Laravel, you can create and register events in multiple way. Read Laravel documentation to learn more about Events.
EventServiceProvider needs to be registered in the containers
MainServiceProvider as well.
To define Broadcasting route go to
More info at Laravel Docs.