From b523e1d4990c848ac2d9d38d28cd590603e82dbe Mon Sep 17 00:00:00 2001 From: "kreaweb.be" Date: Wed, 31 Jul 2024 12:10:29 +0200 Subject: [PATCH] Removed default 'N/A' from Couples --- app/Models/Couple.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Models/Couple.php b/app/Models/Couple.php index 9c9941dc..9d4d29ac 100644 --- a/app/Models/Couple.php +++ b/app/Models/Couple.php @@ -114,13 +114,13 @@ protected function getDateStartFormattedAttribute(): ?string /* returns PARTNER 1 (1 Person) based on person1_id in Couple model */ public function person_1(): BelongsTo { - return $this->belongsTo(Person::class, 'person1_id')->withDefault(['name' => 'N/A']); + return $this->belongsTo(Person::class, 'person1_id'); } /* returns PARTNER 2 (1 Person) based on person2_id in Couple model */ public function person_2(): BelongsTo { - return $this->belongsTo(Person::class, 'person2_id')->withDefault(['name' => 'N/A']); + return $this->belongsTo(Person::class, 'person2_id'); } /* returns ALL CHILDREN (n Person) based on parents_id in Person model */