Skip to content

Commit 8f19965

Browse files
Document support for event listener auto-registration from typehinted __invoke methods (#1520)
1 parent 698b197 commit 8f19965

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: content/collections/extending-docs/addons.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -441,9 +441,9 @@ return view('custom::foo');
441441
## Events
442442

443443
::: tip
444-
Statamic v5.33.0 introduced the concept of "autoloading" for event listeners.
444+
Statamic v5.35.0 introduced the concept of "autoloading" for event listeners.
445445

446-
As long as your event listener lives in `src/Listeners` and the event is typehinted in the listener's `handle` method, they will be automatically registered by Statamic, without you needing to register them manually.
446+
As long as your event listener lives in `src/Listeners` and the event is typehinted in the listener's `handle` or `__invoke` method, they will be automatically registered by Statamic, without you needing to register them manually.
447447

448448
Subscribers will also be autoloaded, as long as they live in `src/Subscribers`.
449449

0 commit comments

Comments
 (0)