ljoboy / drc-data
Our goal is to create solutions for our country (DRC). based on the reality of the situation, this repository will contain the basic data for the creation of any solution.
0.10.1
2021-03-28 12:26 UTC
Requires
- php: >=7.1
- ext-json: *
- ext-mbstring: *
Requires (Dev)
- phpunit/phpunit: ^9.5
README
This library contains DRC location data, populations, cities, provinces and more
Installation
$ composer require ljoboy/drc-data
Examples
Provinces
- Get all provinces
<?php use DRCData\Province; $province = new Province(); //Returning array of object $all_provinces = $province->getAll();
- Get specific province
<?php use DRCData\Province; $province = new Province(); //It's all returning object $specific_province = $province->getByName('kinshasa'); //It's case insensitive $random_province = $province->random(); $province_by_id = $province->getById(5);
Territories
- Get all territories
<?php use DRCData\Territoire; $territoire = new Territoire(); $all_territoire = $territoire->getAll();
- Villes (Cities) can be searched by name and province.
<?php use DRCData\Ville; $ville = new Ville(); $villes = $ville->search('shi'); $villes_by_province_id = $ville->byProvinceId(5);
Contribution
- Please read the Contributing Guideline before raising a PR.
Contributors
Acknowlegments
License
MIT