Пример #1
0
 public function getCityDetailsSzamla()
 {
     return $this->hasOne(WshCoCity::className(), ['cit_zip' => 'zip']);
 }
 public function actionCity($zip)
 {
     $model = WshCoCity::find()->where(["cit_zip" => $zip])->asArray()->one();
     header("Content-Type: application/json");
     echo Json::encode(["city" => $model["cit_name"]]);
     exit;
 }