public function products(string $category, FilterProduct $request): JsonResource 	{ 		$category = (new Category)->getCategoryByIdOrSlug($category, $request->lang);  		$availableCategories = [$category->id, ...$category->children()->pluck('id')];  		return ProductListResource::collection(Product::includes() 												->available() 												->whereHas('productCategories', function ($query) use ($availableCategories) { 													$query->whereIn('category_id', $availableCategories); 												}) 												->search($request->search, $request->lang) 												->adultOnly($request->adult_only) 												->filterPriceRange($request->price_min, $request->price_max) 												->dynamicFilters($request->lang ?? 'hr', $request->filters) 												->orderBy($request->sort_by_field ?? 'created_at', $request->sort_by ?? 'asc') 												->paginate($request->per_page) 												->appends($request->query())); 	}