This commit is contained in:
Simon Pocrnjič
2024-11-19 20:47:46 +01:00
parent 1620136d7d
commit e66eb6436c
3 changed files with 5 additions and 3 deletions
+2 -1
View File
@@ -40,10 +40,11 @@ public function toSearchableArray(): array
'addresses' => $this->person->addresses,
'phones' => $this->person->phones
];*/
$this->loadMissing('person');
$array = $this->toArray();
$array['person'] = $this->person ? $this->person->only('full_name') : null;
$array['person_full_name'] = $this->person ? $this->person->full_name: null;
return $array;
}