Spatie\Backup\Notifications\Notifications\CleanupHasFailed::toMail PHP Method

toMail() public method

public toMail ( ) : Illuminate\Notifications\Messages\MailMessage
return Illuminate\Notifications\Messages\MailMessage
    public function toMail() : MailMessage
    {
        $mailMessage = (new MailMessage())->error()->subject("Cleaning up the backups of `{$this->applicationName()}` failed.")->line("An error occurred while cleaning up the backups of `{$this->applicationName()}`")->line("Exception message: `{$this->event->exception->getMessage()}`")->line("Exception trace: `{$this->event->exception->getTraceAsString()}`");
        $this->backupDestinationProperties()->each(function ($value, $name) use($mailMessage) {
            $mailMessage->line("{$name}: {$value}");
        });
        return $mailMessage;
    }