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

  • admin

    Same as in laravel. Either in your service provider, or in a dedicated event service provider. You can view examples in existing modules.

Log in to reply

Looks like your connection to AsgardCms was lost, please wait while we try to reconnect.