cards
This commit is contained in:
@ -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]);
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user