fix 3
This commit is contained in:
parent
d2f916bb79
commit
e804d6f4d5
|
|
@ -41,9 +41,12 @@ public function toSearchableArray(): array
|
||||||
'phones' => $this->person->phones
|
'phones' => $this->person->phones
|
||||||
];*/
|
];*/
|
||||||
|
|
||||||
return [
|
$this->loadMissing('person');
|
||||||
'person' => $this->person->toArray()
|
$array = $this->toArray();
|
||||||
];
|
|
||||||
|
$array['person'] = $this->person ? $this->person->toArray() : [];
|
||||||
|
|
||||||
|
return $array;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -34,11 +34,12 @@ protected function makeAllSearchableUsing(Builder $query): Builder
|
||||||
|
|
||||||
public function toSearchableArray(): array
|
public function toSearchableArray(): array
|
||||||
{
|
{
|
||||||
return [
|
$this->loadMissing('person');
|
||||||
'person' => $this->person,
|
$array = $this->toArray();
|
||||||
'addresses' => $this->person->addresses,
|
|
||||||
'phones' => $this->person->phones
|
$array['person'] = $this->person ? $this->person->toArray() : [];
|
||||||
];
|
|
||||||
|
return $array;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function client(): BelongsTo
|
public function client(): BelongsTo
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user