Limit 0 Issue Fixed

This commit is contained in:
Devansh 2020-07-16 12:29:56 +05:30
parent 6a1a96ca59
commit 21596b189d
1 changed files with 3 additions and 3 deletions

View File

@ -113,7 +113,7 @@ class ProductRepository extends Repository
$perPage = isset($params['limit']) ? $params['limit'] : current($pages);
} else {
$perPage = isset($params['limit']) ? $params['limit'] : 9;
$perPage = isset($params['limit']) && !empty($params['limit']) ? $params['limit'] : 9;
}
$page = Paginator::resolveCurrentPage('page');
@ -388,7 +388,7 @@ class ProductRepository extends Repository
->where('product_flat.channel', $channel)
->where('product_flat.locale', $locale)
->whereNotNull('product_flat.url_key')
->where(function($subQuery) use ($term) {
->where(function($subQuery) use ($term) {
$queries = explode('_', $term);
foreach (array_map('trim', $queries) as $value) {
@ -399,7 +399,7 @@ class ProductRepository extends Repository
->orderBy('product_id', 'desc');
})->paginate(16);
}
return $results;
}