class EventServiceProvider extends EventServiceProvider (View source)

This service provider is responsible for registering all the event listeners for the application. Events provide a simple observer pattern implementation that allows your application to subscribe and listen for various actions or state changes in your system.

Example usage:

  • When a user registers, fire a UserRegistered event.
  • Attach a listener that sends a welcome email to the new user.

Properties

protected array<string,array<int,string>> $listen

The event listener mappings for the application.

Methods

void
boot()

Register any events and listeners for your application.

Details

void boot()

Register any events and listeners for your application.

This method is called during the bootstrapping of the service provider. You may register additional events here if they are not listed in $listen.

Return Value

void