public function update(StoreCategory $request, Category $slug, Language $default_language): RedirectResponse 	{ 		$langs = getCurrentLanguages(); 		$slug_field_name = Category::getSlugFieldName();  		foreach ($langs as $lang) { 			$required = ($lang === getMainActiveLanguage()) || ($lang === $default_language->getDefaultLanguage());  			$this->validate($request, [ 				'slug.' . $lang => [$required ? 'required' : 'nullable', 'string', 'max:150', new UniqueTranslatableField($slug, $slug_field_name)], 			]); 		}  		$slug->update([ 			'name' => $request->name, 			'slug' => $request->slug, 			'market_id' => getCurrentMarket()->id, 			'description' => $request->description, 			'short_description' => $request->short_description, 			'featured' => $request->boolean('featured'), 			'discontinued' => $request->boolean('discontinued'), 			'use_parent_filters' => $request->boolean('use_parent_filters'), 			'active' => $request->boolean('active'), 			'category_id' => $request->category_id, 		]);  		$slug->storage()->handle();  		$slug->filters()->sync($request->filters);  		foreach ($slug->products as $product) { 			foreach ($request->filters ?? [] as $filter) { 				if (!$product->productFilters->contains('filter_id', $filter)) { 					$product->productFilters()->create([ 						'filter_id' => $filter, 						'value' => '', 					]); 				} 			} 		}  		$slug->features()->delete();  		foreach ($request->features ?? [] as $key => $feature) { 			$slug->features()->create([ 				'name' => $feature, 				'points' => $request->bullet_points[$key] ?? [], 			]); 		}  		$slug->FAQs()->delete(); 		// FAQS 		$data = [];  		for ($i = 0; $i < count($request->order_number ?? []); $i++) { 			$questions_row = []; 			$answers_row = [];  			foreach ($langs as $lang) { 				$questions_row[$lang] = $request->question[$lang][$i]; 				$answers_row[$lang] = $request->answer[$lang][$i]; 			} 			$data[] = new CategoryFAQ([ 				'question' => $questions_row, 				'answer' => $answers_row, 				'order_number' => $request->order_number[$i], 			]); 		}  		$slug->FAQs()->saveMany($data);  		foreach ($request->features ?? [] as $key => $feature) { 			$slug->features()->create([ 				'name' => $feature, 				'points' => $request->bullet_points[$key] ?? [], 			]); 		}  		return $this->redirectFromSave('categories.list'); 	}