public function updateCoupons(StoreCouponCodeDiscount $request, Discount $id): RedirectResponse 	{ 		$request->validate([ 			'code' => ['required', 'max:10', 'string', Rule::unique('discounts')->ignore($id->id)], 		]);  		$id->update([ 			'title' => $request->title, 			'max_use' => $request->max_use, 			'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' => true, 			'active' => $request->boolean('active'), 			'type' => DISCOUNT::COUPON_CODE_DISCOUNT, 		]);  		$id->storeDiscountItems();  		return $this->redirectFromSave('discounts.list'); 	}