name = $database->name; $this->frequency = $backup->frequency; } public function via(object $notifiable): array { return [DiscordChannel::class, TelegramChannel::class, MailChannel::class]; } public function toMail(): MailMessage { $mail = new MailMessage(); $mail->subject("Last Hour Cloud: [ACTION REQUIRED] Backup FAILED for {$this->database->name}"); $mail->view('emails.backup-failed', [ 'name' => $this->name, 'frequency' => $this->frequency, 'output' => $this->output, ]); return $mail; } public function toDiscord(): string { return "Last Hour Cloud: Database backup for {$this->name} with frequency of {$this->frequency} was FAILED.\n\nReason: {$this->output}"; } public function toTelegram(): array { $message = "Last Hour Cloud: Database backup for {$this->name} with frequency of {$this->frequency} was FAILED.\n\nReason: {$this->output}"; return [ "message" => $message, ]; } }