Answer the question
In order to leave comments, you need to log in
How to bind image to laravel color?
Let's say we have an attribute - color. And there are two of its meanings: red, blue. There is one more attribute - the size. Values: L, XL. There is an image attribute. And it has no fixed values
. There is the essence of a T-shirt. There is a table linking it all:
product_id - attribute_id - attribute_value_id
1 (T-shirt) - 1 (Color) - 1 (Red)
1 (T-shirt) - 2 (Size) - 1(L)
1 (T-shirt) - 1 (Color) - 2 (Blue)
How can I make sure that when I request a blue T-shirt color, I get the corresponding images?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question