cache responces achyklar

This commit is contained in:
merdan 2022-12-21 19:55:25 +05:00
parent 8350f5468d
commit 071e6c6425
1 changed files with 5 additions and 1 deletions

View File

@ -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')
->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){
$q->where('product_flat.status',1);
if(request()->has('category'))
{
Log::info(request());
$q->whereIn('product_flat.product_id',function ($q) {
$q->select('product_categories.product_id')->from('product_categories')
->where('product_categories.category_id',request()->get('category'));