Reputation: 593
How did i get my users but start only at a certain position ? I get the 50 first with :
$users = User::orderBy('xp', 'DESC')->take(50)->get();
But now I want the 50 after this, so the 50th to 100th records.
Thanks
Upvotes: 2
Views: 5521
Reputation: 15971
You can use skip()
Laravel eloqunt provides nice way to achieve this.
$users = User::orderBy('xp', 'DESC')->skip(50)->take(50)->get();
Hope this helps.
Upvotes: 11