/** * ACTION CREATE note | $id=PrimaryKey -> TRIGER FROM VIEW -ptr.nov- */ public function actionCreate() { $model = new Employe(); if ($model->load(Yii::$app->request->post())) { $upload_file = $model->uploadFile(); var_dump($model->validate()); if ($model->validate()) { if ($model->save()) { if ($upload_file !== false) { $path = $model->getUploadedFile(); $upload_file->saveAs($path); } return $this->redirect(['view', 'id' => $model->EMP_ID]); } } } else { return $this->render('create', ['model' => $model]); } }