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