So this will be my setup:
User has many Carts => one to many
Items can belong to many Categories => Many to Many
Items can belong to many Carts => Many to Many
I bet there are lots of this kinda stuff. But tell you the truth, navigating among the numerous options is the worst! So I'm asking you all, what can be a good approach to design a database, with the relations and all in order to make such a site? Actually, this can even be a good series here on laracasts, but until this happens... what do you think?
I made a few models. Item, Cart, Category, and User.
How can i set relationship between them in the most good way?
Making a pivot table to an item and a cart? And then a cart and a user? Or everything in one table? You see what I'm saying? Lots of ways.
P.S
I know there are packages for this kindsa stuff but i want to learn best practices in these situations.
Let's discuss this. Thanks!
Please or to participate in this conversation.