Coder Social home page Coder Social logo

Comments (2)

lindyhopchris avatar lindyhopchris commented on July 20, 2024

Hi! Your solution of using the filter method is the best approach at the moment. We're planning a lot of upgrades to the search solution, including the pagination. Out-of-the box pagination support will only ever exist for the pagination strategy implemented by Laravel, which is page based. But we're hoping to make it a lot easier to tie in pagination for specific resource types that need their own pagination approach, e.g. cursor based as you need.

Any suggestions as to how you'd like to integrate cursor based pagination would be appreciated.

I'll leave this issue open as it is related to our plans to upgrade the search functionality.

from laravel-json-api.

lindyhopchris avatar lindyhopchris commented on July 20, 2024

The latest version v0.8 allows for a paging strategy to be injected into the EloquentAdapter class (this was previously EloquentSearch).

This means you can implement cursor based pagination by writing a class that implements Contracts\Pagination\PagingStrategyInterface and then inject that into any adapters that need to use that paging strategy.

Any questions let me know.

from laravel-json-api.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.