data = $data; } /** * Get the notification's delivery channels. * * @param mixed $notifiable * @return array */ public function via($notifiable) { return [ TelegramChannel::class ]; } /** * Format tekegram notification * * @param mixed $notifiable * @return TelegramMessage */ public function toTelegram($notifiable) { $data = $this->data; $msg = "*Speedtest Daily Overview* Average ping: *".$data["ping"]."* Average download: *".$data["download"]."* Average upload: *".$data["upload"]."*"; return TelegramMessage::create() ->to(SettingsHelper::get('telegram_chat_id')->value) ->content($msg) ->options(['parse_mode' => 'Markdown']); } /** * Get the array representation of the notification. * * @param mixed $notifiable * @return array */ public function toArray($notifiable) { return [ // ]; } }