Exemplo n.º 1
0
 /**
  * Creates a new Taller model.
  * If creation is successful, the browser will be redirected to the 'view' page.
  * @return mixed
  */
 public function actionCreate()
 {
     $model = new Taller();
     if ($model->load(Yii::$app->request->post()) && $model->save()) {
         return $this->redirect(['view', 'id' => $model->id]);
     } else {
         return $this->render('create', ['model' => $model]);
     }
 }
 /**
  * Store a newly created resource in storage.
  *
  * @return Response
  */
 public function store(Request $request)
 {
     $taller = new Taller();
     $taller->nombre_taller = $request->nombre;
     $taller->descripcion_taller = $request->descripcion;
     $taller->fecha_inicio_taller = $request->fecha_inicio;
     $taller->fecha_fin_taller = $request->fecha_fin;
     $taller->estado_taller = $request->estado;
     $taller->curso = $request->curso;
     $taller->save();
     return redirect('taller');
 }