methods['getBranchDetails_post']['limit'] = 500; // 50 requests per hour per user/key $this->methods['uploadFiles_post']['limit'] = 500; // 50 requests per hour per user/key // load the model $this->load->model('Branch_model', 'branch_model'); } /* * get branch details * created by kms * */ public function getBranchDetails_get() { $token = ''; $tokens = AUTHORIZATION::validateToken($token); print_r($tokens);die; $requestedBy = $this->post('requestedBy'); $getBranch = $this->branch_model->getBranch($requestedBy); if ($getBranch['branchStatus']) { // Set the response and exit $this->response($getBranch); } else { // Set the response and exit $this->response([ 'message' => 'No records found!', 'branchStatus' => false ]); } } // upload file details public function uploadFiles_post() { $req['doc_name'] = $_FILES['fileKey']['name']; $req['doc_size'] = $_FILES['fileKey']['size']; $req['doc_source'] = $_FILES['fileKey']['tmp_name']; $uploadDetails=$this->branch_model->uploadFiles($req); if ($uploadDetails['uploadStatus']) { // Set the response and exit $this->response($uploadDetails); } else { // Set the response and exit $this->response([ 'message' => 'Upload Faild!', 'uploadStatus' => false ]); } } }