diff --git a/src/Illuminate/Foundation/Support/Providers/EventServiceProvider.php b/src/Illuminate/Foundation/Support/Providers/EventServiceProvider.php index 9be8d5ce2ca7..37e35477411d 100644 --- a/src/Illuminate/Foundation/Support/Providers/EventServiceProvider.php +++ b/src/Illuminate/Foundation/Support/Providers/EventServiceProvider.php @@ -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); })