EmilMoe
6 months ago
207
0
Laravel

Events fired twice

Posted 6 months ago by EmilMoe

I have made listeners for Spatie Backup, but the listeners are triggered twice. I can't see where the problem should be coming from, any ideas?

I register them as this:

if ($this->app->runningInConsole()) {
    if (class_exists(\Spatie\Backup\Events\BackupWasSuccessful::class)) {
        Event::listen(\Spatie\Backup\Events\BackupWasSuccessful::class, BackupWasSuccessfulListener::class);
    }
}

https://github.com/spatie/laravel-backup/issues/1060

Please sign in or create an account to participate in this conversation.