diff --git a/src/Illuminate/Foundation/Support/Providers/EventServiceProvider.php b/src/Illuminate/Foundation/Support/Providers/EventServiceProvider.php index 6259c0bf7704..8fdfe0bacd67 100644 --- a/src/Illuminate/Foundation/Support/Providers/EventServiceProvider.php +++ b/src/Illuminate/Foundation/Support/Providers/EventServiceProvider.php @@ -168,6 +168,17 @@ protected function discoverEventsWithin() ]; } + /** + * Add the given event discovery paths to the application's event discovery paths. + * + * @param string|array $paths + * @return void + */ + public static function addEventDiscoveryPaths(array|string $paths) + { + static::$eventDiscoveryPaths = array_merge(static::$eventDiscoveryPaths, Arr::wrap($paths)); + } + /** * Set the globally configured event discovery paths. *