This is the documentation for
v5 but the latest version is
You can switch versions in the menu on the left/at the top.
Check your current version with the following command:
composer show spatie/laravel-event-sourcing
You can add and remove projectors and reactors via the
Whilst this package can auto-discover your event handlers, it is still useful to be able to add and remove projectors or reactors for your test suite. For example, a slow reactor might be worth removing to speed up your tests if the behaviour of that reactor is not relevant for the feature you are testing.
Adding one projector:
Adding multiple projectors:
Adding one reactor:
Adding multiple reactors:
##Removing Projectors and Reactors
A projector and a reactor are both event handlers. You can remove either of them with the same function.
Removing one event handler:
Removing multiple event handlers: