public function index(FilterProducts $request): JsonResource 	{ 		$lang = app()->getLocale();  		$products = Product::available() 			->notDiscontinued() 			->when($request->has('featured'), function ($query) { 				$query->featured(); 			}) 			->when($request->has('popular'), function ($query) { 				$query->popular(); 			}) 			->when($request->has('stocked'), function ($query) { 				$query->inStock(); 			}) 			->notAccessory() 			->search($request->search, $lang) 			->priceRange($request->price_min, $request->price_max) 			->filterCategory($request->category_slug, $lang) 			->filterColor($request->color) 			->filterManufacturer($request->manufacturer) 			->dynamicFilters($request->filters) 			->orderBy('price_with_pdv', 'desc') 			->includes() 			->latest() 			->paginate($request->per_page);  		$grouped = $products->groupBy('category.name');  		return CategoryProductsResource::collection($grouped); 	}