Replies: 1 comment
-
You can use lazyByIdDesc as follows: Model::lazyByIdDesc(5000)->each(function ($item) {
// use $item
}); This will loop through using the following queries: select * from `model` order by `id` desc limit 5000
select * from `model` where `id` < 20000 order by `id` desc limit 5000;
select * from `model` where `id` < 15000 order by `id` desc limit 5000;
...
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
Just checking if there would be interest in this.
I have a specific use case for this and want to check if this is something that would be merged before I start writing code / tests and make a PR.
Beta Was this translation helpful? Give feedback.
All reactions