app/Http/Controllers/EmpleadoController.php
/**
     * Display a listing of the resource.
     *
     * @return \Illuminate\Http\Response
     */
Display a listing of the resource.
@return \Illuminate\Http\Response
Display a listing of the resource . @return \ Illuminate \ Http \ Response
public function index(Request $request)
    {
        $empleado = $request->get('buscar');
        $empleados = Empleado::where('cedula','like',"%$empleado%")->orderBy('id','desc')->paginate(5);
        return view('empleado.list', compact('empleados'));
    }
public function index ( Request $ request ) { $ empleado = $ request -> get ( 'buscar' ) ; $ empleados = Empleado :: where ( 'cedula' , 'like' , " % $ empleado % " ) -> orderBy ( 'id' , 'desc' ) -> paginate ( 5 ) ; return view ( 'empleado.list' , compact ( 'empleados' ) ) ; }
Display a listing of the resource.
Display a listing of the resource .