v2board/app/Http/Controllers/User/TelegramController.php

28 lines
630 B
PHP
Raw Normal View History

2020-05-19 16:32:35 +08:00
<?php
namespace App\Http\Controllers\User;
use App\Http\Controllers\Controller;
2021-06-12 00:56:39 +08:00
use App\Models\User;
2020-05-19 16:32:35 +08:00
use App\Services\TelegramService;
2021-06-12 00:56:39 +08:00
use Illuminate\Http\Request;
2020-05-19 16:32:35 +08:00
class TelegramController extends Controller
{
public function getBotInfo()
{
$telegramService = new TelegramService();
$response = $telegramService->getMe();
return response([
'data' => [
'username' => $response->result->username
]
]);
}
2021-06-12 00:56:39 +08:00
public function unbind(Request $request)
{
$user = User::where('user_id', $request->session()->get('id'))->first();
}
2020-05-19 16:32:35 +08:00
}