churakovmike/laravel-delayed-events

Laravel delayed event system

dev-main 2021-05-28 10:20 UTC

This package is auto-updated.

Last update: 2024-10-28 17:36:40 UTC


README

Installation

Install this package with composer

composer require churakovmike/laravel-delayed-events

Then you need to publish new Service Provider

php artisan vendor:publish --tag=providers

Add DelayedServiceProvider to your config/app.php

'providers' => [

    /*
     * Package Service Providers...
     */
    DelayedServiceProvider::class,
    
];

All delayed events and listeners must be add to $listenDelayed.

class DelayedEventServiceProvider extends BaseDelayedProvider
{
    protected $listenDelayed = [
        // your delayed events and listeners here
        // TestDelayedEvent::class => [
        //      TestDelayedListener::class,
        // ]
    ];
}