Using Laravel etrepat/baum I would like to modify on the flow the tree but without saving the changes in the database.
When I save the tree I save a value as boolean if an element is the root of the abrevated secondary structure and the idea behind is to redifine the hierarchy and return the new structure as json
- Category-A
-- Category-A1
--- Category-A11
-- Category-A2
--- Category-A21
-------------------------------------
- Category-B
-- Category-B1
--- Category-B11
-------------------------------------
- Category-C
-- Category-C1
--- Category-C11
-- Category-C2
--- Category-C21
desiered structure would be
- Category-B
-- Category-A
--- Category-A1
---- Category-A11
--- Category-A2
---- Category-A21
-- Category-C
--- Category-C1
---- Category-C11
--- Category-C2
---- Category-C21
What is the best approach to achive the desiered result?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire