Beispiel #1
0
 /**
  * Creates a new PaginasCategorias model.
  * If creation is successful, the browser will be redirected to the 'view' page.
  * @return string|\yii\web\Response
  */
 public function run()
 {
     $model = new PaginasCategorias();
     if ($model->load(Yii::$app->request->post()) && $model->save()) {
         return $this->controller->redirect(['view', 'id' => $model->idcategoria]);
     } else {
         return $this->controller->render('create', ['model' => $model]);
     }
 }