/** * Creates a new SmsConfig model. * If creation is successful, the browser will be redirected to the 'view' page. * @return mixed */ public function actionCreate() { $model = new SmsConfig(); if ($model->load(Yii::$app->request->post())) { $model->setAlarmCondition(); if ($model->save()) { return $this->redirect(['index']); } } $data = array_merge(['model' => $model], $this->getViewData()); return $this->render('create', $data); }