Example #1
0
 public function actionGhcreate()
 {
     $model = new MGh();
     if (Yii::$app->request->isPost) {
         $model->load(Yii::$app->request->post());
         if ($model->save()) {
             return $this->redirect(['ghlist']);
         } else {
             U::W($model->getErrors());
         }
     }
     return $this->render('ghcreateupdate', ['model' => $model]);
 }