There are 2 models: Shop and Item. Shop has many items. I’ve defined HAS_MANY relation in Shop class and now use $shop->items to show items. The question: Is it required to define BELONGS_TO relation in Item class, even if I never use it like $item->shop ?
Isn’t the answer obvious? ![]()
If you don’t need something then don’t do it. Everything will work fine.
I thought AR implementation uses both relation definitions, i.e. HAS_MANY and BELONGS_TO.