/** * Creates a new MessageTemplate model. * If creation is successful, the browser will be redirected to the 'view' page. * @return mixed */ public function actionCreate() { $model = new MessageTemplate(); if ($model->load(Yii::$app->request->post()) && $model->save()) { return 'Success'; } else { return $this->renderPartial('_form', [ 'model' => $model, ]); } }