Skip to content

upanastudio/ci_rapi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

ci_rapi

CI Library for RAJA API Wilayah. read more here

Installation

  • Fork this Repo/Download this repo
  • move ci_rapi.php to application/libraries folder on you Codeigniter projects.
  • Voilla!.

How To Use

    public function test(){
        $this->load->library('ci_rapi');

        //check aktif
        $result = $this->ci_rapi->isActive();

        if(!$result){
            echo 'Raja Api Tidak Berfungsi!';
            return FALSE;
        }
        else{
            //get wilayah
            $data  = $this->ci_rapi->getProvinsi();
            $data1 = $this->ci_rapi->getKabupaten(33);
            $data2 = $this->ci_rapi->getKecamatan(3301);
            $data3 = $this->ci_rapi->getKelurahan(3301010);

            //custom set
            $this->ci_rapi->setUrl('wilayah/kabupaten');
            $this->ci_rapi->setArgs('idpropinsi', 33);
            $data_api = $this->ci_rapi->fetch();

            //show result
            echo '<pre>';
            print_r($data_api);
            echo '</pre>';
        }
        die();
    }

Best Experience

You can combine this library with select2chain ci_rapi + Select2Chain

About

CI Library for RAJA API Wilayah

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages