public function actionAuth() { $model = new News(); if ($model->load(Yii::$app->request->post()) && $model->save()) { return $this->redirect(['view', 'id' => $model->name]); } else { return $this->render('auth', ['model' => $model]); } }