TelegramController.php 441 B

1234567891011121314151617181920
  1. <?php
  2. namespace App\Http\Controllers\User;
  3. use App\Http\Controllers\Controller;
  4. use App\Services\TelegramService;
  5. class TelegramController extends Controller
  6. {
  7. public function getBotInfo()
  8. {
  9. $telegramService = new TelegramService();
  10. $response = $telegramService->getMe();
  11. return response([
  12. 'data' => [
  13. 'username' => $response->result->username
  14. ]
  15. ]);
  16. }
  17. }