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