cache responces achyklar
This commit is contained in:
parent
dcdc2b917e
commit
5e9c1d5c4f
|
|
@ -55,7 +55,7 @@ Route::group(['prefix' => 'api'], function () {
|
|||
// ]);
|
||||
|
||||
//Product routes
|
||||
Route::get('products', [Products::class, 'index'])->middleware('cacheResponse:3600');
|
||||
Route::get('products', [Products::class, 'index']);//->middleware('cacheResponse:3600');
|
||||
Route::get('products-discounted', [Products::class, 'discountedProducts'])->middleware('cacheResponse:3600');;
|
||||
Route::get('products-popular', [Products::class, 'popularProducts'])->middleware('cacheResponse:3600');;
|
||||
Route::get('products-search', [Products::class, 'searchProducts'])->middleware('cacheResponse:3600');;
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ class ProductRepository extends WProductRepository
|
|||
// ->whereNotNull('product_flat.url_key');
|
||||
|
||||
if ($categoryId) {
|
||||
$qb->leftJoin('product_categories', 'product_categories.product_id', '=', 'product_flat.product_id')
|
||||
$qb->join('product_categories', 'product_categories.product_id', '=', 'product_flat.product_id')
|
||||
->whereIn('product_categories.category_id', explode(',', $categoryId));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue