/** * @return \yii\db\ActiveQuery */ public function getTrainUsers() { return $this->hasMany(TrainUsers::className(), ['train_id' => 'id']); }