feat(model): menambahkan relasi orderItems ke model barang
This commit is contained in:
parent
5c7060565b
commit
3c830259d8
@ -46,4 +46,9 @@ public function purchaseItems(): MorphMany
|
||||
{
|
||||
return $this->morphMany(PurchaseItem::class, 'purchasable');
|
||||
}
|
||||
|
||||
public function orderItems(): MorphMany
|
||||
{
|
||||
return $this->morphMany(PurchaseItem::class, 'orderable');
|
||||
}
|
||||
}
|
||||
|
||||
@ -56,4 +56,9 @@ public function purchaseItems(): MorphMany
|
||||
{
|
||||
return $this->morphMany(PurchaseItem::class, 'purchasable');
|
||||
}
|
||||
|
||||
public function orderItems(): MorphMany
|
||||
{
|
||||
return $this->morphMany(PurchaseItem::class, 'orderable');
|
||||
}
|
||||
}
|
||||
|
||||
@ -43,4 +43,9 @@ public function purchaseItems(): MorphMany
|
||||
{
|
||||
return $this->morphMany(PurchaseItem::class, 'purchasable');
|
||||
}
|
||||
|
||||
public function orderItems(): MorphMany
|
||||
{
|
||||
return $this->morphMany(PurchaseItem::class, 'orderable');
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user