mlusas's avatar

Updating Pagination Documentation?

The Laravel 5.1 documentation for Pagination seems to be out of date, with methods that are no longer available (ex., paginate()), and new methods that seem to have taken it's place (ex., limit()->skip()->get()). Are there plans to update the documentation in the near future?

I've already pivoted to the new pagination methods (using limit()->skip()->get()), but thought it may be good to update the documentation for new Laravel programmers looking to implement pagination. Though, it would be good to ensure that I've implemented the changes correctly.

0 likes
3 replies
thomaskim's avatar
Level 41

But the paginate() method does exist.

1 like
bjones2015's avatar

@thomaskim Yeah I was about to say the same thing, I'm on the latest for my project and i'm using the pagination method in several places.

1 like
mlusas's avatar

@thomaskim & @bjones2015 Interesting. I just tested out paginate, and it is working, but earlier today I was getting a 'paginate method cannot be found' error. I'm not sure why, but at least it is working. Thank you for confirmation.

Though, I think I'm going to continue using limit, skip, and get, as I'm using cursors. Just in case other are interested, here is the line I'm using:

$userCharacters = UserCharacter::with('images')->limit($this->resultsPerPage)->skip($this->resultsCurrent)->get();
1 like

Please or to participate in this conversation.