public function actionView($id) { $model = $this->findModel($id); $menu = new FileUpload(); $model->scenario = Restaurant::SCENARIO_READ; if ($menu->load(Yii::$app->request->post())) { $this->addMenu($menu, $id); } return $this->render('view', ['model' => $model, 'menu' => $menu]); }