app/Http/Controllers/EventoController.php
/**
     * Update the specified resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  int  $id
     * @return \Illuminate\Http\Response
     */
Update the specified resource in storage.
Update the specified resource in storage .
public function update(Request $request, $id)
    {
        $input = $request->all();
        $affected = DB::table('eventos')->where('id', $id)->update($input);
        return response()->json([
            'res'=>true,
            'message'=>'Evento actualizado correctamente'
        ], 200);
    }
public function update ( Request $ request , $ id ) { $ input = $ request -> all ( ) ; $ affected = DB :: table ( 'eventos' ) -> where ( 'id' , $ id ) -> update ( $ input ) ; return response ( ) -> json ( [ 'res' => true , 'message' => 'Evento actualizado correctamente' ] , 200 ) ; }
Update the specified resource in storage.
Update the specified resource in storage .