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
@@ -34,10 +34,9 @@ protected function makeAllSearchableUsing(Builder $query): Builder
public function toSearchableArray(): array
{
$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;
}