protected function getAmphur($id) { $datas = Amphur::find()->where(['PROVINCE_ID' => $id])->all(); return $this->MapData($datas, 'AMPHUR_ID', 'AMPHUR_NAME'); }
public function getAmphurs() { return @$this->hasOne(Amphur::className(), ['AMPHUR_ID' => 'province']); }