v2board/app/Http/Controllers/User/TelegramController.php
2020-05-19 16:32:35 +08:00

21 lines
441 B
PHP

<?php
namespace App\Http\Controllers\User;
use App\Http\Controllers\Controller;
use App\Services\TelegramService;
class TelegramController extends Controller
{
public function getBotInfo()
{
$telegramService = new TelegramService();
$response = $telegramService->getMe();
return response([
'data' => [
'username' => $response->result->username
]
]);
}
}