K
K
kolyafat2016-04-10 12:14:53
Laravel
kolyafat, 2016-04-10 12:14:53

Paginate and map, how does it work???

Good afternoon, Dear community, please tell me how to make pagination for a collection that has been modified by the map function, is it really only for models ??

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
d-virt, 2016-04-10
@kolyafat

If this is a non-Eloquent collection, then https://laravel.com/docs/5.1/collections#method-forpage
otherwise, create a new collection new \Illuminate\Database\Eloquent\Collection (pass a non-Eloquent collection here) and use paginate

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question