methods['getUniversity_post']['limit'] = 100; // load the employee model $this->load->model('University_model', 'university_model'); } public function getUniversity_post() { $reqData = $this->post('data'); $loginUserId = $reqData['localUserID']; $loginUserBranchId = $reqData['localBranchID']; $loginUserType = $reqData['localType']; $getUniversityListDetails = $this->university_model->get_university_list();// Check if the employee exist if ($getUniversityListDetails) { $getUniversityListDetails['status'] = REST_Controller::HTTP_OK; // Set the response and exit $this->response($getUniversityListDetails, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code } else { // Set the response and exit $this->response([ 'message' => 'No list were found', 'status' => REST_Controller::HTTP_NOT_FOUND ], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code } } public function updateUniversityDetail_post() { $reqData = $this->post('data'); $req['UpdatedBy'] = $this->post('updatedBy'); $date = date('Y-m-d H:i:s'); $req['UpdatedOn'] = $date; $req['UniversityName']= $reqData['UniversityName']; $req['UniversityShortName']= $reqData['UniversityShortName']; $req['MobileNumber']= $reqData['MobileNumber']; $req['EmailID']= $reqData['EmailID']; $req['Address']= $reqData['Address']; $req['IsActive']= $reqData['IsActive']; $updateFor = $reqData['UniversityID']; $updateUniversityDetail = $this->university_model->update_university_details($updateFor, $req);// Check if the employee exist if ($updateUniversityDetail) { $updateUniversityDetail['status'] = REST_Controller::HTTP_OK; // Set the response and exit $this->response($updateUniversityDetail, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code } else { // Set the response and exit $this->response([ 'message' => 'No list were found', 'status' => REST_Controller::HTTP_NOT_FOUND ], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code } } }