Skip to main content
Version: 11.x



  • 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 App\Ship\Parents\Events\Event.

Folder Structure

- App
- Containers
- {section-name}
- {container-name}
- Events
- SomethingHappenedEvent.php
- ...
- Listeners
- ListenToMusicListener.php
- ...

- Ship
- Events
- GlobalStateChanged.php
- SomethingBiiigHappenedEvent.php
- ...


In Laravel, you can create and register events in multiple way. Read Laravel documentation to learn more about Events.

Your custom EventServiceProvider needs to be registered in the containers MainServiceProvider as well.


To define Broadcasting channels go to app/Ship/Boardcasts/channels.php.

Further reading

More info at Laravel Docs.