Laravel 5: Events – EventServiceProvider

Scheduler: Events – EventServiceProvider


Registering with EventServiceProvider.

EventServiceProvider
Register events and listeners:

Array of events each with sub-arrays of listeners associated with (listening to) given event.


Register subscribers:

One subscriber per line.


Closure, manually registering events.
Best way to register events and listeners is via property $listen.
There is a way to register closure based events via EventServiceProvider boot() method, like this:

Wildcard events.
You may even register listeners using the * as a wildcard parameter, allowing you to catch multiple events on the same listener.

It is also done via EventServiceProvider boot() method.