mercredi 1 mars 2017

Laravel menu loop

I have a table where I store my sidebar menu data. There are fields:

  1. id
  2. name
  3. deepness (level of menu item)
  4. ancestor_id (id of current table item)
  5. url

I need to make a proper tree from this table in my blade template. But I have no idea how to loop or how prepare data for loop. I need a clue for unlimited deepness of tree... Maybe I designed database table by wrong way?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire