Statamic v3 - Understanding Event Listeners

Hi everyone,

I’m trying to wrap my head around Statamic V3 Events listener.

For exemple, I would like to listen to the form Submission event. (FormSubmitted)

I did something like this without any good result:

Step 1:

Referring to the Laravel documentation, I have to register the listener in the app/EventServiceProvider.php.

    protected $listen = [
        'Statamic\Events\FormSubmitted' => [

Step 2:

I run the terminal

php artisan event:generate

That commande generate the folders structure in /app.


I have zero idea if what i’m doing is right.

Can someone help me understand how to listen to Statamic V3 events?

Many thanks!

Answered by Simon Bédard!
>>>>>>> Answered <<<<<<<
6 Replies