/** * Creates a new Customers model. * If creation is successful, the browser will be redirected to the 'view' page. * @return mixed */ public function actionCreate() { $model = new Customers(); $model->scenario = 'customerEdit'; if ($model->load(Yii::$app->request->post()) && $model->save()) { return $this->redirect(['view', 'id' => $model->id]); } else { return $this->render('create', ['model' => $model]); } }
public function actionCreate() { $mod = new Customers(); if ($mod->load(Yii::$app->request->post()) && $mod->create()) { // VarDumper::dump($_POST["Cancel"]); // return $this->goBack(); $this->redirect(array('/table/index')); } else { return $this->render('create', ['model' => $mod]); } }