Skip to main content

OrderAddress Model

The OrderAddress model manages addresses associated with orders. It supports polymorphic relationships, allowing it to be linked dynamically to different models

Relationships

  • **Addressable (Polymorphic Relationship):**An order address can be associated with multiple types of models dynamically.
    public function addressable(): MorphTo
    {
    return $this->morphTo();
    }


  • **Activity Logging:**The model logs activities using the Spatie Activity Log package
    public function getActivitylogOptions(): LogOptions
    {
    return LogOptions::defaults();
    }

Table Columns

  • id - The primary key of the order addresses table.
  • table - The associated table (shop_order_addresses).
  • created_at - Timestamp for record creation.
  • updated_at - Timestamp for last record update