This commit is contained in:
2025-01-19 17:15:58 +03:00
parent 40369fb515
commit b18378bcb1
41 changed files with 1257 additions and 30 deletions

View File

@ -2,7 +2,9 @@
namespace app\modules\tgbot\controllers;
use kernel\app_modules\tag\service\TagService;
use kernel\Controller;
use kernel\modules\post\models\Post;
class TgMainController extends Controller
{
@ -21,4 +23,18 @@ class TgMainController extends Controller
$this->cgView->render("index.php");
}
public function actionNews(): void
{
$news = TagService::getEntityByTagId(2, Post::class);
$this->cgView->render("news.php", ['news' => $news]);
}
public function actionPromo(): void
{
$news = TagService::getEntityByTagId(1, Post::class);
$this->cgView->render("news.php", ['news' => $news]);
}
}