According to etrepat/baum Docs, getNestedList() must return a key-value pair array indicating a node's depth with a separator.
This is my Table data and Structure :
By this Code :
$categories = Category::getNestedList('name',NULL,'-');
return $categories;
Result is :
While it should look like this
means that ever child Category must came immediately after it's Parent and order by lft column field But getNestedList() Does not this wotk and return Categories In the same way that are inserted to Table.
How can I do my purpose ?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire