From a591848ba90c3581636e552b8a872f41c0851859 Mon Sep 17 00:00:00 2001 From: Artur Nowakowski Date: Sun, 15 Dec 2019 21:47:11 +0100 Subject: [PATCH] fix for postgres --- api/app/Repositories/ProductsRepository.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/api/app/Repositories/ProductsRepository.php b/api/app/Repositories/ProductsRepository.php index e4ec20e..e791e7a 100644 --- a/api/app/Repositories/ProductsRepository.php +++ b/api/app/Repositories/ProductsRepository.php @@ -17,7 +17,8 @@ class ProductsRepository implements ProductsRepositoryInterface { $query = Product::query(); if(isset($filters['search'])){ - $query->where('name', 'like', "${filters['search']}%"); + $search = ucfirst($filters['search']); + $query->where('name', 'like', "${search}%"); } return $query->paginate($filters['limit']);