laravel-nestedset
laravel-nestedset copied to clipboard
How to have a list of categories in a tree with pagination
Hi, I have a list of categories and subcategories and I want to display the pagination without considering the parent of the child, so that if we have 2 categories and each category has 2 children, then when pagination based on the parents, it should not be paginated only and Consider children too.
For example: if the number of pagination is 2 and we have 2 parent categories that have two groups of 2 children, we have a total of 8 categories, including children,And I want the pagination to be paged according to the parent and the children, not just the parents.

Please help in this regard. Similar to my question, it has been implemented in the WordPress category system, and I want to implement it similarly.