update email template
This commit is contained in:
@@ -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
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user