load->model('studies/plan_model', 'PlanModel'); // Load set the addonID of the model to let to check the permissions $this->PlanModel->setAddonID($this->_getAddonID()); } public function getCurricula() { $courseOfStudiesID = $this->get('studiengang_kz'); $result = $this->PlanModel->getCurricula($courseOfStudiesID); if(is_object($result)) { $payload = [ 'success' => TRUE, 'message' => 'Curricula found', 'data' => $result->result() ]; $httpstatus = REST_Controller::HTTP_OK; } else { $payload = [ 'success' => FALSE, 'message' => 'Curricula not found' ]; $httpstatus = REST_Controller::HTTP_OK; } $this->response($payload, $httpstatus); } }