<?php

namespace App\Services;

use Illuminate\Support\Facades\Http;

class TelegramService
{
    protected $chatId = '-1004296888999'; // Ваш chat_id
    protected $token = '8736864734:AAGLxkm1WiD1bFTWmuyDHaGOkFHJHiuHIMI'; // Ваш токен бота

    public function sendMessage($message)
    {
        $response = Http::get("https://api.telegram.org/bot{$this->token}/sendMessage", [
            'chat_id' => $this->chatId,
            'text' => $message
        ]);

        return $response->successful();
    }
}
