$products = Product::whereHas('category', function ($query) use ($categorySlug, $brandSlug) {
$query->whereHas('brand', function ($query) use ($brandSlug) {
$query->where('slug', $brandSlug);
});
$query->where('slug', $categorySlug);
})
->orderBy('quantity', 'DESC')
->orderBy('code')
->get();