public function creditCard(StripeBilling $billing) { $customerId = Auth::user()->customer_id; $card = null; if (!empty($customerId)) { $card = $billing->retrieveCard($customerId); } $plans = MembershipPlan::all(); return view('dashboard.subscription.credit-card', ['card' => $card, 'plans' => $plans]); }
public function member(StripeBilling $billing) { $customerId = Auth::user()->customer_id; $card = null; if (!empty($customerId)) { $card = $billing->retrieveCard($customerId); } $planId = Auth::user()->plan_id; $plan = MembershipPlan::findOrFail($planId); return view('dashboard.index', ['card' => $card, 'membershipPlan' => $plan]); }