public function actionServerAdd() { $model = new Servers(); if (isset($_POST['Servers'])) { $model->attributes = $_POST['Servers']; if ($model->validate() && $model->save()) { Yii::app()->user->setFlash('notify', array('type' => 'success', 'message' => Yii::t('admin', 'Server added'))); $this->redirect(array('servers')); } } $this->render('servers/edit', array('model' => $model)); }