spatie / laravel-backup

A package to backup your Laravel app
https://spatie.be/docs/laravel-backup
MIT License
5.65k stars 763 forks source link

BackupWasSuccessful event not firing in Laravel 9 #1536

Closed AleJavierHY closed 2 years ago

AleJavierHY commented 2 years ago

Following the documentation I am trying to listen to the BackupWasSuccessful event but it does not fire. I am using version 9 of Laravel. How could I solve this problem?

protected $listen = [
      'Spatie\Backup\Events\BackupWasSuccessful' => [
            'App\Listeners\BackupWasSuccessfulListener',
   ],
];
PaolaRuby commented 2 years ago

How could I solve this problem?

Making a PR with the fix

freekmurze commented 2 years ago

It seems like currently we only send events if notifications are set up. I'll fix this in the next major version.