From 48d4479721a17e3a0df6a0d7e48eba15c1eb5498 Mon Sep 17 00:00:00 2001 From: Daniel Plomp Date: Sat, 9 Dec 2023 17:31:09 +0100 Subject: [PATCH] Add title search to CuratorPanel Updated the search query in CuratorPanel to include the 'title' field. This ensures search results return the correct items when a user searches using the title. --- src/Components/Modals/CuratorPanel.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Components/Modals/CuratorPanel.php b/src/Components/Modals/CuratorPanel.php index ae566eb3..cf5739e8 100644 --- a/src/Components/Modals/CuratorPanel.php +++ b/src/Components/Modals/CuratorPanel.php @@ -267,6 +267,7 @@ public function updatedSearch(): void return $query->where('directory', $this->directory); }) ->where('name', 'like', '%' . $this->search . '%') + ->orWhere('title', 'like', '%' . $this->search . '%') ->orWhere('alt', 'like', '%' . $this->search . '%') ->orWhere('caption', 'like', '%' . $this->search . '%') ->orWhere('description', 'like', '%' . $this->search . '%')