Esempio n. 1
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getDistricts()
 {
     return $this->hasMany(Districts::className(), ['regency_id' => 'id']);
 }
Esempio n. 2
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getDistrict()
 {
     return $this->hasOne(Districts::className(), ['id' => 'district_id']);
 }