How to listen events?
-
Hello,
I want to generate an avatar when a user is created or updated.
I saw in the documentation that the User Module have severals events : UserWasCreated and UserWasUpdated but how can I listen this events?
Can I have an example, please?Thank you
-
Same as in laravel. Either in your service provider, or in a dedicated event service provider. You can view examples in existing modules.