public function updateGiftCode(StoreGiftCodeDiscount $request, Discount $id): RedirectResponse 	{ 		$request->validate([ 			'code' => ['required', 'max:10', 'string', Rule::unique('discounts')->ignore($id->id)], 		]);  		$id->update([ 			'title' => $request->title, 			'max_use' => 1, 			'period_from' => $request->period_from ? formatTimestamp($request->period_from, 'Y-m-d H:i:s', $request->user()->timezone) : null, 			'period_to' => $request->period_to ? formatTimestamp($request->period_to, 'Y-m-d H:i:s', $request->user()->timezone) : null, 			'code' => $request->code, 			'amount' => $request->amount, 			'is_percentage' => false, 			'active' => $request->boolean('active'), 			'type' => Discount::GIFT_CODE_DISCOUNT, 		]);  		return $this->redirectFromSave('discounts.list'); 	}