2023-11-17 01:44:01 -05:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Http\Controllers\V1\User;
|
|
|
|
|
|
|
|
use App\Http\Controllers\Controller;
|
|
|
|
use App\Models\User;
|
|
|
|
use App\Services\TelegramService;
|
|
|
|
use Illuminate\Http\Request;
|
|
|
|
|
|
|
|
class TelegramController extends Controller
|
|
|
|
{
|
|
|
|
public function getBotInfo()
|
|
|
|
{
|
|
|
|
$telegramService = new TelegramService();
|
|
|
|
$response = $telegramService->getMe();
|
2023-12-06 15:01:32 -05:00
|
|
|
$data = [
|
|
|
|
'username' => $response->result->username
|
|
|
|
];
|
|
|
|
return $this->success($data);
|
2023-11-17 01:44:01 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
public function unbind(Request $request)
|
|
|
|
{
|
|
|
|
$user = User::where('user_id', $request->user['id'])->first();
|
|
|
|
}
|
|
|
|
}
|