Skip to content
This repository has been archived by the owner on Jul 16, 2021. It is now read-only.

[Feature] Paginate ordinary collections #1566

Open
alexbowers opened this issue Mar 19, 2019 · 0 comments
Open

[Feature] Paginate ordinary collections #1566

alexbowers opened this issue Mar 19, 2019 · 0 comments

Comments

@alexbowers
Copy link

When a collection is returned from Eloquent, there is a paginate method on it. This is helpful for API responses.

However, if your data doesn't come from Eloquent, you have to build your own paginator to get the same structure.

having a paginate method on all collections would be useful.

Currently you have to do something like this:

return new Paginator(collect());

But and pass through some options to set the URLs correctly etc.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant