Exemplo n.º 1
0
 public function actionCreateRegion($id)
 {
     $model = new FRegion();
     $model->id_okrug = $id;
     if (Yii::$app->request->isPost) {
         $post = Yii::$app->request->post();
         $model->load($post);
         if ($model->validate()) {
             $model->save();
             $this->redirect(['geo/index-region', "id" => $id]);
         }
     }
     return $this->render('createRegion', ['model' => $model]);
 }