atayahmet / laravel-nestable

Laravel 5 nested category/menu generator
MIT License
214 stars 52 forks source link

how to get only one category children #7

Closed ahmadyousefdev closed 7 years ago

ahmadyousefdev commented 8 years ago

Hi ! Thank you so much for this amazing resource,

I want to know if there is a way to only render one category with its children.

for example:

how can I only get cat1 with its children: cat2 and cat3

Thank you.

atayahmet commented 7 years ago

Hi @ahmadalukah

Actually no shortcut to it in package but you can pass native sql query result to nestable()->make($result) method. (for now)

https://github.com/atayahmet/laravel-nestable#helper

I will add this feature next version and create a task about this.