From fbcb1e544e7719ec248c8313b7f3f8795b94de6b Mon Sep 17 00:00:00 2001 From: Vincent BRIDIER Date: Mon, 16 Aug 2021 15:23:38 +0200 Subject: [PATCH] - Add search by ID --- app/Http/Controllers/TicketController.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/TicketController.php b/app/Http/Controllers/TicketController.php index e77b31a..bf57618 100644 --- a/app/Http/Controllers/TicketController.php +++ b/app/Http/Controllers/TicketController.php @@ -114,8 +114,9 @@ class TicketController extends Controller })->map(function (TicketType $ticket) { return $ticket->value; }); - $q->where('text', 'LIKE', "%$word%") - ->orWhereIn('status', $s) + $q->where('id', $word) + ->orwhere('text', 'LIKE', "%$word%") + ->orWhereIn('status', $s) ->orWhereIn('type', $t) ->orWhere('file', 'LIKE', "%$word%") ->orWhere('file2', 'LIKE', "%$word%")