server->unreachable_notification_sent === false) { return; } GetContainersStatus::dispatch($server)->onQueue('high'); // dispatch(new ContainerStatusJob($server)); } public function via(object $notifiable): array { $channels = []; $isEmailEnabled = isEmailEnabled($notifiable); $isDiscordEnabled = data_get($notifiable, 'discord_enabled'); $isTelegramEnabled = data_get($notifiable, 'telegram_enabled'); if ($isDiscordEnabled) { $channels[] = DiscordChannel::class; } if ($isEmailEnabled) { $channels[] = EmailChannel::class; } if ($isTelegramEnabled) { $channels[] = TelegramChannel::class; } return $channels; } public function toMail(): MailMessage { $mail = new MailMessage(); $mail->subject("Last Hour Cloud: Server ({$this->server->name}) revived."); $mail->view('emails.server-revived', [ 'name' => $this->server->name, ]); return $mail; } public function toDiscord(): string { $message = "Last Hour Cloud: Server '{$this->server->name}' revived. All automations & integrations are turned on again!"; return $message; } public function toTelegram(): array { return [ "message" => "Last Hour Cloud: Server '{$this->server->name}' revived. All automations & integrations are turned on again!" ]; } }