whatsapp_number ?? null; if ($to === null) { return; } $body = method_exists($notification, 'toVonageSms') ? $notification->toVonageSms($notifiable) : null; if ($body === null) { return; } $url = 'https://rest.nexmo.com/sms/json'; try { $this->apiLogger->send(self::NAME, 'POST', $url, fn () => Http::timeout(10) ->asForm() ->post($url, [ 'api_key' => $key, 'api_secret' => $secret, 'from' => $from, 'to' => ltrim($to, '+'), 'text' => $body, ])); } catch (Throwable $e) { Log::error('VonageSmsChannel: send failed', ['error' => $e->getMessage()]); } } }