public function update(UpdateCategory $request, Category $id): RedirectResponse 	{ 		$request->validate([ 			'slug' => ['required', 'string', 'max:50', 'unique:' . get_class($id) . ',slug,' . $id->id], 			'slug_en' => [ 				'required', 'string', 'max:50', 				Rule::unique(Translation::class, 'value') 					->ignore($id->id, 'item_id') 					->where(function ($query) use ($id) { 						return $query->where('item_type', get_class($id)); 					}), 			], 		]);  		$id->update([ 			'category_id' => $request->category_id, 			'name' => $request->name, 			'slug' => $request->slug, 			'active' => $request->boolean('active'), 			'use_parent_filters' => $request->boolean('use_parent_filters'), 			'description' => $request->description, 			'adult_only' => $request->boolean('adult_only'), 			'extra_costs_on_shipping' => $request->boolean('extra_costs_on_shipping'), 			'extra_costs' => $request->extra_costs ?? 0, 			'apply_vat_rates_on_children' => $request->boolean('apply_vat_rates_on_children'), 			'seo_name' => $request->seo_name, 			'seo_description' => $request->seo_description, 		]);  		$id->updateTranslations([ 			'name' => [ 				'en' => $request->name_en, 			], 			'slug' => [ 				'en' => $request->slug_en, 			], 			'description' => [ 				'en' => $request->description_en, 			], 			'seo_name' => [ 				'en' => $request->seo_name_en, 			], 			'seo_description' => [ 				'en' => $request->seo_description_en, 			], 		]);  		$id->storeFilters($request->selected_filters); 		$id->storage()->handle($request->media);  		foreach ($request->countries as $index => $value) { 			$id->vatRates()->updateOrCreate(['country_code' => $index], ['amount' => $value ?: 0]);  			if ($request->boolean('apply_vat_rates_on_children')) { 				$children = $id->children;  				/** 				 * @var \App\Models\Category $child 				 */ 				foreach ($children as $child) { 					$child->vatRates()->updateOrCreate(['country_code' => $index], ['amount' => $value ?: 0]); 				} 			} 		}  		Cache::forget('menu-en'); 		Cache::forget('menu-hr');  		return $this->redirectFromSave('categories.list'); 	}