diff --git a/app/Models/Client.php b/app/Models/Client.php index 09e759e..3e7d6dc 100644 --- a/app/Models/Client.php +++ b/app/Models/Client.php @@ -34,6 +34,7 @@ protected function makeAllSearchableUsing(Builder $query): Builder public function toSearchableArray(): array { + $this->load('person'); $person = [ 'full_name' => $this->person->full_name, 'addresses' => $this->person->addresses, diff --git a/app/Models/ClientCase.php b/app/Models/ClientCase.php index adc9aae..8983764 100644 --- a/app/Models/ClientCase.php +++ b/app/Models/ClientCase.php @@ -34,6 +34,7 @@ protected function makeAllSearchableUsing(Builder $query): Builder public function toSearchableArray(): array { + $this->load('person'); return [ 'person' => $this->person, 'addresses' => $this->person->addresses,