Friday, May 4, 2018

Inserting Items and SubItems to a Order - development

Inserting Items and SubItems to a Order

I need to be able to add subItems to my orders system.

I have this structure: Example

enter image description here

The subitem is like an additional model for a dish.
As for example in a burger, in case the client wants to add a lettuce, tomato or onion. It also needs the item_id to identify which item of that order the subitem belongs to.

Then I end up with this model: Last Model

enter image description here

  • Is this the best way to doing this ?
  • Am I going to have performance problems when quering ?


from Laravel Questions and Answers https://laravelquestions.com/php/inserting-items-and-subitems-to-a-order/
via Lzo Media

No comments:

Post a Comment