/** * Creates a new Settings model. * If creation is successful, the browser will be redirected to the 'view' page. * @return mixed */ public function actionCreate() { $model = new Settings(); $section = $model->getSection(); $type = $model->getType(); // dump($section); // if(Yii::$app->request->post()) // { // echo '<pre>'; // var_dump(Yii::$app->request->post()); // exit; // } if ($model->load(Yii::$app->request->post()) && $model->save()) { return $this->redirect(['view', 'id' => $model->id]); } else { return $this->render('create', ['model' => $model, 'section' => $section, 'type' => $type]); } }