From 0841cd2c068e7a32cb395cd049de1b202c4913b1 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Mon, 4 Dec 2023 07:58:59 +1100 Subject: [PATCH] Account relation to activity table --- app/Models/Activity.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/Models/Activity.php b/app/Models/Activity.php index 311ee6b614..57ac9fc7c8 100644 --- a/app/Models/Activity.php +++ b/app/Models/Activity.php @@ -353,6 +353,10 @@ class Activity extends StaticModel return $this->belongsTo(Expense::class)->withTrashed(); } + public function account(): \Illuminate\Database\Eloquent\Relations\BelongsTo + { + return $this->belongsTo(Account::class); + } public function recurring_expense(): \Illuminate\Database\Eloquent\Relations\BelongsTo {