errors = $errors; } /** * Get the notification's delivery channels. * * @param mixed $notifiable * @return array */ public function via($notifiable) { return [ TelegramChannel::class ]; } /** * Format telegram notification * * @param mixed $notifiable * @return TelegramMessage */ public function toTelegram($notifiable) { $msg = NotificationsHelper::formatAbsoluteThresholdMessage($this->errors); return TelegramMessage::create() ->to(SettingsHelper::get('telegram_chat_id')->value) ->content($msg) ->options(['parse_mode' => 'Markdown']); } }