update email template

This commit is contained in:
baodev0
2026-09-09 16:56:22 +07:00
parent d3d9f76ba0
commit 2365ef72e9
210 changed files with 6335 additions and 4688 deletions
+8 -1
View File
@@ -18,6 +18,7 @@ class Order extends Model
protected $casts = [
'date' => 'date',
'paid_at' => 'datetime',
];
public function customer()
@@ -41,12 +42,18 @@ class Order extends Model
return $this->hasMany(OrderItem::class, 'order_id');
}
/** Invoice generated from this order. */
/** First/primary invoice generated from this order (kept for backward compat — an order can have many). */
public function invoice()
{
return $this->hasOne(Invoice::class, 'order_id');
}
/** All invoices billed against this order (initial + renewals) — an order can have many. */
public function invoices()
{
return $this->hasMany(Invoice::class, 'order_id');
}
// -------------------------------------------------------------------------
// Helpers
// -------------------------------------------------------------------------