fix 6
This commit is contained in:
@@ -34,11 +34,11 @@ protected function makeAllSearchableUsing(Builder $query): Builder
|
||||
|
||||
public function toSearchableArray(): array
|
||||
{
|
||||
$this->loadMissing('person');
|
||||
|
||||
$array = $this->toArray();
|
||||
|
||||
$array['person_full_name'] = $this->person ? $this->person->full_name: null;
|
||||
$array['person'] = $this->person ? $this->person->only(['full_name', 'tax_number', 'social_security_number']): null;
|
||||
$array['person_addresses'] = $this->person->addresses ? $this->person->addresses->only(['adddress'])->toArray() : [];
|
||||
$array['person_phones'] = $this->person->phones ? $this->person->phones->only(['nu'])->toArray() : [];
|
||||
|
||||
return $array;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user