Skip to content

Commit b6423cc

Browse files
feat: wildcards in event discovery paths (#10164)
* feat: wildcards in event discovery paths Add documentation for the feature introduced in <laravel/framework#53932>. * Update events.md --------- Co-authored-by: Taylor Otwell <taylor@laravel.com>
1 parent 137331f commit b6423cc

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

events.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,12 @@ If you plan to store your listeners in a different directory or within multiple
8484
__DIR__.'/../app/Domain/Orders/Listeners',
8585
])
8686

87+
You may scan for listeners in multiple similar directories using the `*` character as a wildcard:
88+
89+
->withEvents(discover: [
90+
__DIR__.'/../app/Domain/*/Listeners',
91+
])
92+
8793
The `event:list` command may be used to list all of the listeners registered within your application:
8894

8995
```shell

0 commit comments

Comments
 (0)