Answer the question
In order to leave comments, you need to log in
How to make a record in 3 tables in Yii2?
There are three tables:
property - real estate objects (id, name, ....)
property_props - properties of real estate objects (id, name)
property_props_values - property values (id, property_id, prop_id, value) You
need to do 2 things:
1. In the form edit (_form.php) it is necessary to display properties from the property_props table
2. When saving a property, it is necessary to write the property value to the property_props_values table
Leave links to examples of such implementation or suggest a better option
Answer the question
In order to leave comments, you need to log in
Many To Many relationship, there is a description in the official documentation
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question