示例#1
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getBaseNews()
 {
     return $this->hasMany(BaseNews::className(), ['id' => 'base_news_id'])->viaTable('base_news_base_tag', ['base_tag_id' => 'id']);
 }
示例#2
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getBase()
 {
     return $this->hasOne(BaseNews::className(), ['id' => 'base_id']);
 }