cache responces achyklar
This commit is contained in:
parent
35f2ebc761
commit
8350f5468d
|
|
@ -3,6 +3,7 @@
|
|||
namespace Sarga\API\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Sarga\API\Http\Resources\Catalog\Brand;
|
||||
use Sarga\Brand\Repositories\BrandRepository;
|
||||
|
||||
|
|
@ -54,11 +55,12 @@ class Brands extends \Webkul\RestApi\Http\Controllers\V1\Shop\ResourceController
|
|||
}
|
||||
|
||||
$query->whereHas('flats', function($q){
|
||||
$q->where('status',1);
|
||||
$q->where('product_flat.status',1);
|
||||
|
||||
if(request()->has('category'))
|
||||
{
|
||||
$q->whereIn('product_id',function ($q) {
|
||||
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'));
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue