Reputation: 123
i have in database one table, her data can be related with many tables, and i am using table below.
Columns:
How to write this relation, using hasMany() and viaTable() methods ?
Upvotes: 0
Views: 137
Reputation: 793
I think, you are searching something like this: https://github.com/samdark/yii2-cookbook/blob/master/book/ar-single-table-inheritance.md
Upvotes: 1