Spatie\Backup\Notifications\Notifications\BackupHasFailed::toSlack PHP Method

toSlack() public method

public toSlack ( ) : Illuminate\Notifications\Messages\SlackMessage
return Illuminate\Notifications\Messages\SlackMessage
    public function toSlack() : SlackMessage
    {
        return (new SlackMessage())->error()->content("Failed back up of `{$this->applicationName()}`")->attachment(function (SlackAttachment $attachment) {
            $attachment->title('Exception message')->content($this->event->exception->getMessage());
        })->attachment(function (SlackAttachment $attachment) {
            $attachment->title('Exception trace')->content($this->event->exception->getTraceAsString());
        })->attachment(function (SlackAttachment $attachment) {
            $attachment->fields($this->backupDestinationProperties()->toArray());
        });
    }