Ejemplo n.º 1
0
 /**
  * @return mixed|string|\yii\web\Response
  */
 public function actionCreate()
 {
     $model = new User(['scenario' => 'newUser']);
     if ($model->load(Yii::$app->request->post()) && $model->save()) {
         return $this->redirect(['view', 'id' => $model->id]);
     }
     return $this->renderIsAjax('create', compact('model'));
 }