Skip to content

Commit

Permalink
[11.x] Add addEventDiscoveryPaths to EventServiceProvider (#51896)
Browse files Browse the repository at this point in the history
* Add addEventDiscoveryPaths to EventServiceProvider

* Update EventServiceProvider.php

---------

Co-authored-by: Jascha <[email protected]>
Co-authored-by: Taylor Otwell <[email protected]>
  • Loading branch information
3 people authored Jun 24, 2024
1 parent 33424be commit e4796bc
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand Down

0 comments on commit e4796bc

Please sign in to comment.