function index() { $animal_treatment_service = new Animal_treatment_service(); $animal_service = new Animal_service(); $treatment_service = new Treatment_service(); $data['heading'] = "Animal Treatment"; $data['treatment_detils'] = $treatment_service->get_all_treatments(); $data['animal_details'] = $animal_service->get_all_animals(); $data['results'] = $animal_treatment_service->get_all_animal_treatments(); $parials = array('content' => 'treatment/animal_treatment_view'); $this->template->load('template/main_template', $parials, $data); }
public function delete_treatment() { $treatment_service = new Treatment_service(); echo $treatment_service->delete_treatment(trim($this->input->post('id', TRUE))); }