예제 #1
0
 public function actionSaveEmail()
 {
     $model = new EmailForm();
     if ($model->load(Yii::$app->request->post()) && $model->update()) {
         return $this->redirect(['default/index']);
     }
 }
예제 #2
0
 public function actionIndex()
 {
     $model = new EmailForm();
     if ($model->load(Yii::$app->request->post()) && $model->update()) {
         return $this->redirect(['index']);
     } else {
         return $this->render('index', ['model' => $model]);
     }
 }