getBaseUrl(); $url = "{$baseUrl}/chat.postMessage"; $channel = $notifiable->routeNotificationFor("slack", $notification); $message = $notification->toSlack($notifiable); Http::withToken($this->getClientToken()) ->post($url, array_merge($message->getPayload(), [ "channel" => $channel, ])); } protected function getClientToken(): string { return config("services.slack.client_token"); } protected function getBaseUrl(): string { return config("services.slack.url"); } }