/** * @return \yii\db\ActiveQuery */ public function getPlayers() { return $this->hasMany(Player::className(), ['position_id' => 'id']); }
/** * @return \yii\db\ActiveQuery */ public function getPlayer() { return $this->hasOne(Player::className(), ['id' => 'player_id']); }