diff --git a/Apollo/api/application/controllers/StudentView_Controller.php b/Apollo/api/application/controllers/StudentView_Controller.php new file mode 100644 index 00000000..687cea79 --- /dev/null +++ b/Apollo/api/application/controllers/StudentView_Controller.php @@ -0,0 +1,62 @@ +methods['getStudentInfo_post']['limit'] = 500; + // load the employee model + $this->load->model('Studentview_model', 'studentview_model'); + + } + + /* + *get student basic info + * created by kms + * */ + public function getStudentInfo_post() + { + $requestedBy = $this->post('requestedBy'); + + $studentListDetails = $this->studentview_model->getStudentInfo($requestedBy);// Check if the employee exist + if ($studentListDetails) { + $studentListDetails['status'] = REST_Controller::HTTP_OK; + // Set the response and exit + $this->response($studentListDetails, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code + } else { + // Set the response and exit + $this->response([ + 'message' => 'No users were found', + 'status' => REST_Controller::HTTP_NOT_FOUND + ], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code + } + + } +}