This commit is contained in:
Abhishek Mali
2025-11-25 13:14:53 +05:30
parent a14fe614e5
commit bebe0711f4
18 changed files with 1105 additions and 623 deletions

View File

@@ -46,4 +46,15 @@ class Order extends Model
->withTimestamps();
}
public function shipmentItems()
{
return $this->hasMany(\App\Models\ShipmentItem::class, 'order_id', 'id');
}
public function shipments()
{
return $this->belongsToMany(\App\Models\Shipment::class, 'shipment_items', 'order_id', 'shipment_id');
}
}