Merge branch 'master' of https://github.com/bagisto/bagisto into development

This commit is contained in:
Prashant Singh 2019-01-29 18:42:38 +05:30
commit a0ebafd1c6
1 changed files with 3 additions and 14 deletions

View File

@ -401,11 +401,11 @@ class ProductRepository extends Repository
* @param integer $categoryId
* @return Collection
*/
public function findAllByCategoryQueryBuilder($categoryId = null)
public function findAllByCategory($categoryId = null)
{
$params = request()->input();
return app('Webkul\Product\Repositories\ProductFlatRepository')->scopeQuery(function($query) use($params, $categoryId) {
$results = app('Webkul\Product\Repositories\ProductFlatRepository')->scopeQuery(function($query) use($params, $categoryId) {
$channel = request()->get('channel') ?: (core()->getCurrentChannelCode() ?: core()->getDefaultChannelCode());
$locale = request()->get('locale') ?: app()->getLocale();
@ -466,18 +466,7 @@ class ProductRepository extends Repository
});
return $qb;
});
}
/**
* @param integer $categoryId
* @return Collection
*/
public function findAllByCategory($categoryId = null)
{
$params = request()->input();
$results = $this->findAllByCategoryQueryBuilder($categoryId)->paginate(isset($params['limit']) ? $params['limit'] : 9);
})->paginate(isset($params['limit']) ? $params['limit'] : 9);
return $results;
}