has('coupon')) { $coupon = $this->couponService->getCoupon($request->coupon); } $cart = $this->cartService->getCartItems(Auth::user()->id); $calculatedCart = $this->cartService->calculateCart($cart, $coupon); $payments = $this->settingsService->getSettings(['type' => 'payment']); return view('payment.checkout', [ 'slug' => $slug, 'cart' => $cart, 'coupon' => $coupon, 'payments' => $payments, ...$calculatedCart, ]); } }