jeudi 2 février 2017

Laravel 5.4 Create Custom Breadcrumbs Table

I have categories which have child categories. This child categories can also have many child categories and many parent categories. So it is chained to it's children with Many to Many relationship.

This child categories can also have many products and this products can be in many categories.

I have 2 cases:

  1. If product does not have custom breadcrumb it will get first category in it's categories and recursively go up until root with the same algorithm (getting first parent) and generate breadcrumb. (I have already done this case).
  2. If we want to chose custom way to root category in possible many routes to it.

I can't figure out how I can create table structure to be more performance friendly. Please help me to create table structure.

One more thing. If category structure is changed, all related custom breadcrums must be rerouted.



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2kv3mNV
via IFTTT

Aucun commentaire:

Enregistrer un commentaire