Answer the question
In order to leave comments, you need to log in
How to get pagination of not all records from the database?
When paginating, all records are taken from the database. But you need to take for example 500 records, and the following code does not work. Tell me how to be.
Note::query()
->where ('published', 1)
->take (500)
->paginate(100);
Answer the question
In order to leave comments, you need to log in
During pagination, N records are retrieved from the database, which are specified in paginate(N)
What do you want to do? To not be able to scroll to the latest entries?
Then filter by some parameter so that it gives out the necessary records, and not all.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question