public function index(FilterProduct $request, CrawlerDetect $crawlerDetect): JsonResource 	{ 		NewSearchAction::dispatchIf( 			(Str::length($request->search ?? '') > 2 && !$crawlerDetect->isCrawler() && !in_array($request->search, SearchTerm::BLACKLISTED_TERMS)), 			$request->search 		);  		return ProductListResource::collection(Product::includes($request->lang) 			->available() 			->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()));  		// ako bi se trebalo ubaciti i kategorije u isti search 		// select id, name, "product" as table_name from products where name LIKE '%Paški%' union select id, name, "category" as table_name from categories where name like '%knjige%'; 	}