Skip to content

Conversation

jackbayliss
Copy link

@jackbayliss jackbayliss commented Jun 25, 2025

Straight forward enough, but it uses the Event Facade rather than manually retrieving the dispatcher class, which I think improves clarity. Under the hood its the same afaik. May be nicer to put them in a method, but leaving as is for now.

Replaces $this->app->make(Dispatcher::class)->listen() with Event::listen()

Feel free to close if you don't prefer it, but seems to be the norm now. Here's some examples.

Alternative is app('events')

@jackbayliss jackbayliss marked this pull request as ready for review June 25, 2025 23:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant