I use $products=Product::getNestedList('title',null,'--'); in my controller .but this return all category with each depth, I want show just depth<=2 ,i try to use $products=Product::getNestedList('title',null,'--')->limitDepth(2); and $products=Product::getNestedList('title',null,'--')->getDescendants(2); and $products=Product::where('depth','<=',2)->getNestedList('title',null,'--'); but not work . how can i filter with depth ?
I use
$products=Product::getNestedList('title',null,'--');
in my controller .but this return all category with each depth, I want show justdepth<=2
,i try to use$products=Product::getNestedList('title',null,'--')->limitDepth(2);
and$products=Product::getNestedList('title',null,'--')->getDescendants(2);
and$products=Product::where('depth','<=',2)->getNestedList('title',null,'--');
but not work . how can i filter with depth ?