/** * Creates a new Feedback model. * If creation is successful, the browser will be redirected to the 'view' page. * @return mixed */ public function actionCreate() { $model = new Feedback(); $model->scenario = 'create'; if ($model->load(Yii::$app->request->post())) { $model->file = UploadedFile::getInstance($model, 'file'); $model->save(); return $this->redirect(['index']); } return $this->render('create', ['model' => $model]); }