コード例 #1
0
ファイル: Region.php プロジェクト: frozenpandaman/stat.ink
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getSplatfests()
 {
     return $this->hasMany(Splatfest::className(), ['region_id' => 'id']);
 }
コード例 #2
0
ファイル: Team.php プロジェクト: frozenpandaman/stat.ink
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getFests()
 {
     return $this->hasMany(Splatfest::className(), ['id' => 'fest_id'])->viaTable('splatfest_team', ['team_id' => 'id']);
 }
コード例 #3
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getFest()
 {
     return $this->hasOne(Splatfest::className(), ['id' => 'fest_id']);
 }