fix

parent 85ebfa4c
...@@ -65,7 +65,7 @@ class PostTag extends \common\components\ActiveRecordModel ...@@ -65,7 +65,7 @@ class PostTag extends \common\components\ActiveRecordModel
*/ */
public function getPosts() public function getPosts()
{ {
return $this->hasMany(Post::className(), ['id' => 'post_id'])->viaTable('posts_tags_assign', ['tag_id' => 'id']); return $this->hasMany(Post::className(), ['id' => 'post_id'])->viaTable('posts_tags_assign', ['tag_id' => 'id'])->where(['active' => 1]);
} }
/** /**
......
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