fix for postgres

This commit is contained in:
Artur Nowakowski 2019-12-15 21:47:11 +01:00
parent 9b56b357d9
commit a591848ba9

View File

@ -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']);