From 2cabe52440411f7de072b1e37cdfc8effea066c3 Mon Sep 17 00:00:00 2001 From: Sagar Date: Thu, 7 Nov 2024 17:29:51 +0100 Subject: [PATCH] feat: relation to retrieve the assigned user is added to the user model --- app/Models/Report.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/Models/Report.php b/app/Models/Report.php index f6e45e66..a0d808c6 100644 --- a/app/Models/Report.php +++ b/app/Models/Report.php @@ -78,6 +78,11 @@ public function users(): BelongsTo return $this->belongsTo(User::class); } + public function assignedTo(): BelongsTo + { + return $this->belongsTo(User::class); + } + public function transformAudit(array $data): array { return changeAudit($data);