fix 4
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user