/** * Creates a new Skill model. * If creation is successful, the browser will be redirected to the 'view' page. * @return mixed */ public function actionCreate() { $model = new Skill(); $model->scenario = 'insert'; if ($model->load(Yii::$app->request->post())) { // var_dump(Yii::$app->request->post());die; MyModel::upload($model); if ($model->save() && MyModel::updateParents($model)) { // die("X"); return $this->redirect(['view', 'id' => $model->id]); } return $this->render('create', ['model' => $model]); } else { return $this->render('create', ['model' => $model]); } }