Skip to content

Commit fd07e20

Browse files
authored
Add wildcard directory discovery to the EventServiceProvider (#53932)
Co-authored-by: jared.cannon <[email protected]>
1 parent aec8ad4 commit fd07e20

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Illuminate/Foundation/Support/Providers/EventServiceProvider.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,9 @@ public function shouldDiscoverEvents()
146146
public function discoverEvents()
147147
{
148148
return (new Collection($this->discoverEventsWithin()))
149+
->flatMap(function ($directory) {
150+
return glob($directory, GLOB_ONLYDIR);
151+
})
149152
->reject(function ($directory) {
150153
return ! is_dir($directory);
151154
})

0 commit comments

Comments
 (0)