onQueue('high'); } public function via(object $notifiable): array { if ($this->channel) { $channels = match ($this->channel) { 'email' => [EmailChannel::class], 'discord' => [DiscordChannel::class], 'telegram' => [TelegramChannel::class], 'slack' => [SlackChannel::class], 'pushover' => [PushoverChannel::class], default => [], }; } else { $channels = $notifiable->getEnabledChannels('test'); } return $channels; } public function middleware(object $notifiable, string $channel) { return match ($channel) { EmailChannel::class => [new RateLimited('email')], default => [], }; } public function toMail(): MailMessage { $mail = new MailMessage; $mail->subject('Coolify: Test Email'); $mail->view('emails.test'); return $mail; } public function toDiscord(): DiscordMessage { $message = new DiscordMessage( title: ':white_check_mark: Test Success', description: 'This is a test Discord notification from Coolify. :cross_mark: :warning: :information_source:', color: DiscordMessage::successColor(), isCritical: $this->ping, ); $message->addField(name: 'Dashboard', value: '[Link]('.base_url().')', inline: true); return $message; } public function toTelegram(): array { return [ 'message' => 'Coolify: This is a test Telegram notification from Coolify.', 'buttons' => [ [ 'text' => 'Go to your dashboard', 'url' => isDev() ? 'https://staging-but-dev.coolify.io' : base_url(), ], ], ]; } public function toPushover(): PushoverMessage { return new PushoverMessage( title: 'Test Pushover Notification', message: 'This is a test Pushover notification from Coolify.', buttons: [ [ 'text' => 'Go to your dashboard', 'url' => base_url(), ], ], ); } public function toSlack(): SlackMessage { return new SlackMessage( title: 'Test Slack Notification', description: 'This is a test Slack notification from Coolify.' ); } }