Пример #1
0
 public function getOrderItems()
 {
     return $this->hasMany(OrderItem::className(), ['item_id' => 'id'])->via('items');
 }
Пример #2
0
 public function getOrderItems()
 {
     return $this->hasMany(OrderItem::className(), ['order_id' => 'id']);
 }