From d8f841262e2f8bcf293df64f2ff1ed2c0e523eac Mon Sep 17 00:00:00 2001 From: David Bomba Date: Thu, 21 Nov 2024 16:45:42 +1100 Subject: [PATCH] Update searchable key name --- app/Models/Client.php | 5 +++++ app/Models/ClientContact.php | 4 ++++ app/Models/Invoice.php | 5 +++++ 3 files changed, 14 insertions(+) diff --git a/app/Models/Client.php b/app/Models/Client.php index 9f22463ac9..ca723a7317 100644 --- a/app/Models/Client.php +++ b/app/Models/Client.php @@ -286,6 +286,11 @@ class Client extends BaseModel implements HasLocalePreference return $this->hashed_id; } + public function scoutKeyName() + { + return 'hashed_id'; + } + public function getEntityType() { return self::class; diff --git a/app/Models/ClientContact.php b/app/Models/ClientContact.php index ed2eedde99..a81c4e1e08 100644 --- a/app/Models/ClientContact.php +++ b/app/Models/ClientContact.php @@ -190,6 +190,10 @@ class ClientContact extends Authenticatable implements HasLocalePreference return $this->hashed_id; } + public function scoutKeyName() + { + return 'hashed_id'; + } /* V2 type of scope */ diff --git a/app/Models/Invoice.php b/app/Models/Invoice.php index 8540e4379f..34e23f1488 100644 --- a/app/Models/Invoice.php +++ b/app/Models/Invoice.php @@ -271,6 +271,11 @@ class Invoice extends BaseModel return $this->hashed_id; } + public function scoutKeyName() + { + return 'hashed_id'; + } + public function getEntityType() { return self::class;