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