la_bot_back/app/modules/tgbot/controllers/TgBotRestController.php

20 lines
489 B
PHP
Raw Normal View History

2025-01-03 02:11:09 +03:00
<?php
namespace app\modules\tgbot\controllers;
2025-01-20 00:12:30 +03:00
use app\modules\tgbot\models\Tgbot;
2025-01-03 02:11:09 +03:00
class TgBotRestController extends \kernel\app_modules\tgbot\controllers\TgBotRestController
{
2025-01-20 00:12:30 +03:00
public function actionGetScanBtn(int $id): void
{
$dialog = Tgbot::where("dialog_id", $id)->first();
if ($dialog){
$this->renderApi([
'html' => '<a class="btn btn-primary" href="/miniapp/scan">Сканировать</a>',
]);
}
}
2025-01-03 02:11:09 +03:00
}