From dfc2f9ffe2dbf36aad7ba690b16d3493ae3ba176 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Sun, 26 Nov 2023 20:45:40 +1100 Subject: [PATCH] Fixes for search --- app/Http/Controllers/SearchController.php | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/app/Http/Controllers/SearchController.php b/app/Http/Controllers/SearchController.php index a32c9fdf6ec0..10ca2a6b25bd 100644 --- a/app/Http/Controllers/SearchController.php +++ b/app/Http/Controllers/SearchController.php @@ -65,12 +65,10 @@ class SearchController extends Controller $client->contacts->each(function ($contact) { $this->client_contacts[] = [ 'name' => $contact->present()->search_display(), - 'type' => '/client_contact', - 'id' => $contact->hashed_id, - 'path' => "/clients/{$contact->hashed_id}" - ]; - - + 'type' => '/client', + 'id' => $contact->client->hashed_id, + 'path' => "/clients/{$contact->client->hashed_id}" + ]; }); }