cache responces achyklar
This commit is contained in:
parent
8350f5468d
commit
071e6c6425
|
|
@ -53,13 +53,17 @@ class Brands extends \Webkul\RestApi\Http\Controllers\V1\Shop\ResourceController
|
||||||
$query = $query->join('menu_brands','brands.id','=','menu_brands.brand_id')
|
$query = $query->join('menu_brands','brands.id','=','menu_brands.brand_id')
|
||||||
->where('menu_brands.menu_id', $menu);
|
->where('menu_brands.menu_id', $menu);
|
||||||
}
|
}
|
||||||
|
elseif($category = $request->input('category'))
|
||||||
|
{
|
||||||
|
$query = $query->join('category_brands','brands.id','=','category_brands.brand_id')
|
||||||
|
->where('category_brands.category_id',$category);
|
||||||
|
}
|
||||||
|
|
||||||
$query->whereHas('flats', function($q){
|
$query->whereHas('flats', function($q){
|
||||||
$q->where('product_flat.status',1);
|
$q->where('product_flat.status',1);
|
||||||
|
|
||||||
if(request()->has('category'))
|
if(request()->has('category'))
|
||||||
{
|
{
|
||||||
Log::info(request());
|
|
||||||
$q->whereIn('product_flat.product_id',function ($q) {
|
$q->whereIn('product_flat.product_id',function ($q) {
|
||||||
$q->select('product_categories.product_id')->from('product_categories')
|
$q->select('product_categories.product_id')->from('product_categories')
|
||||||
->where('product_categories.category_id',request()->get('category'));
|
->where('product_categories.category_id',request()->get('category'));
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue