search fix
This commit is contained in:
@@ -35,14 +35,10 @@ protected function makeAllSearchableUsing(Builder $query): Builder
|
||||
public function toSearchableArray(): array
|
||||
{
|
||||
|
||||
$array = $this->toArray();
|
||||
|
||||
$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;
|
||||
return [
|
||||
'person.full_name' => '',
|
||||
'person_addresses.address' => ''
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -34,13 +34,10 @@ protected function makeAllSearchableUsing(Builder $query): Builder
|
||||
|
||||
public function toSearchableArray(): array
|
||||
{
|
||||
$array = $this->toArray();
|
||||
|
||||
$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;
|
||||
return [
|
||||
'person.full_name' => ''
|
||||
];
|
||||
}
|
||||
|
||||
public function client(): BelongsTo
|
||||
|
||||
@@ -63,11 +63,11 @@ protected function makeAllSearchableUsing(Builder $query): Builder
|
||||
public function toSearchableArray(): array
|
||||
{
|
||||
return [
|
||||
'first_name' => $this->first_name,
|
||||
'last_name' => $this->last_name,
|
||||
'full_name' => $this->full_name,
|
||||
'addresses' => $this->addresses,
|
||||
'phones' => $this->phones
|
||||
'first_name' => '',
|
||||
'last_name' => '',
|
||||
'full_name' => '',
|
||||
'person_addresses.address' => '',
|
||||
'person_phones.nu' => ''
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user