You are viewing documentation for an outdated version. It is no longer supported!

Register Listeners and Subscribers

The Athenaeum Events package offers way to register Event Listenersopen in new window and Subscribersopen in new window via configuration.

It serves as an alternative registration method than that provided by Laravelopen in new window.

<?php
return [

    'listeners' => [

        \Acme\Users\Events\UserCreated::class => [
            \Acme\Users\Listeners\LogNewUser::class,
            \Acme\Users\Listeners\SendWelcomeEmail::class,
        ],
        'payments.*' => [
            \Acma\Payments\Listeners\VerifyPaymentSession::class
        ],
        
        // ... etc
    ],

    'subscribers' => [

        \Acme\Orders\Subscribers\OrderEventsSubscriber::class,
        \Acme\Users\Subscribers\TrialPeriodSubscriber::class,

        // ... etc
    ]
];