示例#1
0
文件: Blog.php 项目: kdes70/hotel.lok
 /**
  * @return \yii\db\ActiveQuery
  * Read more at: http://yiiwheels.com/extension/yii2-taggable-behavior
  */
 public function getBlogTags()
 {
     $viaTable = '{{%blog_tags_blog}}';
     return $this->hasMany(BlogTags::className(), ['id' => 'tag_id'])->viaTable($viaTable, ['blog_id' => 'id']);
 }