Beispiel #1
0
 /**
  * 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]);
     }
 }
Beispiel #2
0
 /**
  * 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]);
     }
 }