Laravel’s events provide a simple observer implementation, allowing you to subscribe and listen for various events that occur in your application.
The EventServiceProvider
included with your Laravel application provides a convenient place to register all of your application’s event listeners. The listen
property contains an array of all events (keys) and their listeners (values).
To generate events and listeners add listeners and events to your EventServiceProvider
and use the event:generate
command.
php artisan event:generate