コード例 #1
0
ファイル: DotaEvent.php プロジェクト: aldegtyarev/fantasy
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getEventHeroesList()
 {
     return $this->hasMany(DotaEventHero::className(), ['event_id' => 'id'])->with('hero');
 }
コード例 #2
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getEventHero()
 {
     return $this->hasOne(DotaEventHero::className(), ['hero_id' => 'hero_id']);
 }