From f768932b4b4af883bf1ebb4de91f5287b1d1f325 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Fri, 6 Oct 2023 14:23:06 +1100 Subject: [PATCH] updates for exposing pivot deleted_at column --- app/Models/Invoice.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Models/Invoice.php b/app/Models/Invoice.php index 687cde690ebc..c9754a1fc006 100644 --- a/app/Models/Invoice.php +++ b/app/Models/Invoice.php @@ -316,7 +316,7 @@ class Invoice extends BaseModel */ public function payments(): \Illuminate\Database\Eloquent\Relations\MorphToMany { - return $this->morphToMany(Payment::class, 'paymentable')->withTrashed()->withPivot('amount', 'refunded')->withTimestamps(); + return $this->morphToMany(Payment::class, 'paymentable')->withTrashed()->withPivot('amount', 'refunded', 'deleted_at')->withTimestamps(); } /**