Giter Site home page Giter Site logo

Comments (4)

taylorotwell avatar taylorotwell commented on May 4, 2024

Wouldn't it better to slice the data coming out of Mongo instead of letting the Paginator do it?

from framework.

JoostK avatar JoostK commented on May 4, 2024

There's the method Illuminate\Database\Query\Builder::buildRawPaginator which does this. Perhaps that one can be moved to the Paginator class.

from framework.

andrewryno avatar andrewryno commented on May 4, 2024

My initial reason behind not paginating straight ouf of Mongo was although we would only display the top X results, we need the the other results for graphing the data. So we display the top 50 results based on a column value, but we need all results in order to graph over time (since the top 50 can be from any time period).

To reduce the queries (granted it's negligible between 1 and 2) and also reduce the amount of reusable math in my controllers, it would be helpful (but obviously not necessary) to have those methods available. I don't really have a problem keeping it as it is, but just a thought I had while working with it.

from framework.

taylorotwell avatar taylorotwell commented on May 4, 2024

I would suggest just slicing it and passing it into the paginator.

from framework.

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.