/** * Creates a new Decisions model. * If creation is successful, the browser will be redirected to the 'view' page. * @return mixed */ public function actionCreate() { $model = new Decisions(); if ($model->load(Yii::$app->request->post()) && $model->save()) { return $this->redirect(['view', 'id' => $model->ada]); } else { return $this->render('create', ['model' => $model]); } }
public function actionAdmin_panel() { $model = new Decisions(); if ($model->load(Yii::$app->request->post())) { if ($model->validate()) { // form inputs are valid, do something here return; } } return $this->render('admin_panel', ['model' => $model]); }