jeudi 27 octobre 2016

spatie/laravel-backup notifications not posting

Using Laravel 5.3 and v4 from spatie/laravel-backup package.

I am using this package from Spatie which allows me to take backups using a simple terminal command. It is pretty straight forward to set up and when I run the command the backup runs as intended.

But there is also an option in the config file to set notifications (send mail, post to slack, ...) after a backup. This does not seem to do anything for me. I neither receive mails (and I have set my mailaddress) or see posts to my dedicated slack channel (and i have added the webhook).

I have already included the following composer packages since researching this problem:

  • Guzzlehttp/guzzle
  • maknz/slack-laravel
  • maknz/slack

This is the simple notifications section in the config file:

'notifications' => [

    'notifications' => [
        \Spatie\Backup\Notifications\Notifications\BackupHasFailed::class         => ['mail'],
        \Spatie\Backup\Notifications\Notifications\UnhealthyBackupWasFound::class => ['mail'],
        \Spatie\Backup\Notifications\Notifications\CleanupHasFailed::class        => ['mail'],
        \Spatie\Backup\Notifications\Notifications\BackupWasSuccessful::class     => ['mail'],
        \Spatie\Backup\Notifications\Notifications\HealthyBackupWasFound::class   => ['mail'],
        \Spatie\Backup\Notifications\Notifications\CleanupWasSuccessful::class    => ['mail'],
    ],

    /*
     * Here you can specify the notifiable to which the notifications should be sent. The default
     * notifiable will use the variables specified in this config file.
     */
    'notifiable' => \Spatie\Backup\Notifications\Notifiable::class,

    'mail' => [
        'to' => 'nicolas@******.***',
    ],

    'slack' => [
        'webhook_url' => 'http://ift.tt/2ey8k91',
    ],
],


Not really sure if I am forgetting something? Thanks for the help

Extra: This is a talk at Laracon EU 2016, where the creator (Freek) shows off his package.



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2eUgCVM
via IFTTT

Aucun commentaire:

Enregistrer un commentaire