app/Http/Controllers/EleccionController.php
/**
     * Store a newly created resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return \Illuminate\Http\Response
     */
Store a newly created resource in storage.
Store a newly created resource in storage .
public function store(Request $request)
    {
        $this->validateData($request);
        $campos
            = array(
                'periodo'           => $request->periodo,
                'fecha'             => $request->fecha,
                'fechaapertura'     => $request->apertura,
                'horaapertura'      => $request->horaApertura,
                'fechacierre'       => $request->cierre,
                'horacierre'        => $request->horaCierre,
                'observaciones'     => $request->observaciones,
            );
        Eleccion::create($campos);
        echo " Eleccion guarda correctamente ... ";
    }
public function store ( Request $ request ) { $ this -> validateData ( $ request ) ; $ campos = array ( 'periodo' => $ request -> periodo , 'fecha' => $ request -> fecha , 'fechaapertura' => $ request -> apertura , 'horaapertura' => $ request -> horaApertura , 'fechacierre' => $ request -> cierre , 'horacierre' => $ request -> horaCierre , 'observaciones' => $ request -> observaciones , ) ; Eleccion :: create ( $ campos ) ; echo "  Eleccion guarda correctamente ...  " ; }
Store a newly created resource in storage.
Store a newly created resource in storage .