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