Is there a possibility for paginate the collection? #227
-
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
Hi @ElisameAraujo, It's possible to make pagination work with |
Beta Was this translation helpful? Give feedback.
-
For the first answer, no, but I can try it. For the second, yep, is not what I want Where Categoria Principal is the parent category and the Nome da Categoria with a dash (—) is a child under parent. How I can paginate using this structure? |
Beta Was this translation helpful? Give feedback.
-
Use the |
Beta Was this translation helpful? Give feedback.
Hi @ElisameAraujo,
Did you try
Categorias::tree()->paginate(2)
(without->toTree()
)?It's possible to make pagination work with
Categorias::tree()->paginate(2)->toTree()
, but that only gives you the root categories and I assume that's not what you want.