cache responces achyklar

This commit is contained in:
merdan 2022-12-17 16:33:29 +05:00
parent dcdc2b917e
commit 5e9c1d5c4f
2 changed files with 2 additions and 2 deletions

View File

@ -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');;

View File

@ -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));
}