/** * Creates a new Room model. * If creation is successful, the browser will be redirected to the 'view' page. * @return mixed */ public function actionCreate() { $this->layout = 'admin'; $model = new Room(); if ($model->load(Yii::$app->request->post())) { $model->photo = $model->uploadMultiple($model, 'room_img'); $model->save(); return $this->redirect(['view', 'id' => $model->roomid]); } else { return $this->render('create', ['model' => $model]); } }