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