This commit is contained in:
18
api/app/Services/Telegram/TelegramService.php
Normal file
18
api/app/Services/Telegram/TelegramService.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
namespace App\Services\Telegram;
|
||||
|
||||
use App\Services\Service;
|
||||
use Illuminate\Support\Facades\Http;
|
||||
|
||||
class TelegramService extends Service
|
||||
{
|
||||
public static function send($message)
|
||||
{
|
||||
Http::post('https://api.telegram.org/bot' . env('TELEGRAM_BOT_TOKEN') . '/sendMessage', [
|
||||
'chat_id' => env('TELEGRAM_CHAT_ID'),
|
||||
'parse_mode' => 'HTML',
|
||||
'text' => $message,
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user