mirror of
https://github.com/v2board/v2board.git
synced 2024-11-14 07:29:13 +08:00
28 lines
630 B
PHP
28 lines
630 B
PHP
<?php
|
|
|
|
namespace App\Http\Controllers\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();
|
|
return response([
|
|
'data' => [
|
|
'username' => $response->result->username
|
|
]
|
|
]);
|
|
}
|
|
|
|
public function unbind(Request $request)
|
|
{
|
|
$user = User::where('user_id', $request->session()->get('id'))->first();
|
|
}
|
|
}
|