user()->account_id) ->with(['contact']) ->get(); } public function save($data) { $account = auth()->user()->account; $customer = new AccountGatewayToken(); $customer->account_id = $account->id; $customer->fill($data); $customer->save(); $paymentMethod = PaymentMethod::createNew(); $paymentMethod->account_gateway_token_id = $customer->id; $paymentMethod->fill($data['payment_method']); $paymentMethod->save(); $customer->default_payment_method_id = $paymentMethod->id; $customer->save(); return $customer; } }