/** * Creates a new Admins model. * If creation is successful, the browser will be redirected to the 'view' page. * @return mixed */ public function actionCreate() { $model = new Admins(); if ($model->load(Yii::$app->request->post())) { $res = $model->saveAdmin(Yii::$app->request->post()); if ($res) { return $this->redirect(['view', 'id' => $model->Admin_id]); } } else { return $this->render('create', ['model' => $model]); } }