diff --git a/src/Models/Invoice.php b/src/Models/Invoice.php index 9d11e18..6aa84af 100644 --- a/src/Models/Invoice.php +++ b/src/Models/Invoice.php @@ -122,4 +122,8 @@ public function invoiceable() { return $this->morphTo('invoiceable'); } + public function refundAmount() + { + return $this->payments()->where('method', 'REFUND')->sum('amount'); + } }