app/Http/Controllers/CargoController.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)
    {
        $request->validate([
            'nombre' => 'required',
        ]);
        $update = ['nombre' => $request->nombre];
        Cargo::where('id',$id)->update($update);
        return redirect()->route('cargo.index')->with('datos','Registro Editado Correctamente!');
    }
public function update ( Request $ request , $ id ) { $ request -> validate ( [ 'nombre' => 'required' , ] ) ; $ update = [ 'nombre' => $ request -> nombre ] ; Cargo :: where ( 'id' , $ id ) -> update ( $ update ) ; return redirect ( ) -> route ( 'cargo.index' ) -> with ( 'datos' , 'Registro Editado Correctamente!' ) ; }
Update the specified resource in storage.
Update the specified resource in storage .
//  return Redirect::to('marca') // ->with('success','Marca Actualizado Satisfactoriamente');