コード例 #1
0
 public function getTeams()
 {
     return $this->hasMany(\app\models\teams\Teams::className(), ['id_team' => 'id_team'])->viaTable('{{%team_tournaments}}', ['id_tournament' => 'id_tournament']);
 }
コード例 #2
0
ファイル: Countries.php プロジェクト: Andrewkha/sportforecast
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getTeams()
 {
     return $this->hasMany(Teams::className(), ['country' => 'id']);
 }
コード例 #3
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getIdTeam()
 {
     return $this->hasOne(Teams::className(), ['id_team' => 'id_team']);
 }