From 1bc6203e44bcaa18ec622ab8a1316cd9c3112c11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20Pocrnji=C4=8D?= Date: Tue, 19 Nov 2024 18:44:02 +0100 Subject: [PATCH] Fixed scout relation tables. --- app/Models/Client.php | 1 + app/Models/ClientCase.php | 1 + 2 files changed, 2 insertions(+) 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,