app/Http/Controllers/CargoController.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)
    {
        Cargo::create($request->all());
        return redirect()->route('cargo.index')->with('datos','Registro Guardado Correctamente!');
    }
public function store ( Request $ request ) { Cargo :: create ( $ request -> all ( ) ) ; return redirect ( ) -> route ( 'cargo.index' ) -> with ( 'datos' , 'Registro Guardado Correctamente!' ) ; }
Store a newly created resource in storage.
Store a newly created resource in storage .
// $request->validate([ //     'nombre' => 'required', // ]); //  return Redirect::to('cargo') // ->with('success','Cargo Creado Satisfactoriamente.');