public function detailsforcustomer() { $customerId = $this->input->post('customerId'); $customerService = new CustomerService(); $details = $customerService->fetchCustomersWithCredit(); $this->renderAjaxView('detailsforcustomer', array('details' => $details)); }