test

parent 6467955a
...@@ -26,9 +26,22 @@ class PostController extends BaseController ...@@ -26,9 +26,22 @@ class PostController extends BaseController
'Tag' => 'Просмотр тега', 'Tag' => 'Просмотр тега',
'View' => 'Просмотр записи', 'View' => 'Просмотр записи',
'Send-article' => 'Послать статью', 'Send-article' => 'Послать статью',
'Tags'=>''
]; ];
} }
public function actionTags()
{
$models = Post::find()->joinWith('postTagAssigns')->where([
PostTagAssign::tableName().'.tag_id' => [2,5]
]);
foreach ($models as $model)
{
echo $model->id . '<br>';
}
}
/** /**
* Displays all Post models. * Displays all Post models.
* @return mixed * @return mixed
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment