This commit is contained in:
apuc committed 2025-01-19 17:15:58 +03:00
1 parent 40369fb515
commit b18378bcb1
41 files changed
+1257 -30

No files matched your search

@@ -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]);
}
}