Skip to content

Commit

Permalink
Add wildcard directory discovery to the EventServiceProvider (#53932)
Browse files Browse the repository at this point in the history
Co-authored-by: jared.cannon <jaredcannon9@gmail.com>
  • Loading branch information
jared-cannon and jared-cannon authored Dec 17, 2024
1 parent aec8ad4 commit fd07e20
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,9 @@ public function shouldDiscoverEvents()
public function discoverEvents()
{
return (new Collection($this->discoverEventsWithin()))
->flatMap(function ($directory) {
return glob($directory, GLOB_ONLYDIR);
})
->reject(function ($directory) {
return ! is_dir($directory);
})
Expand Down

0 comments on commit fd07e20

Please # to comment.