1. Go to this page and download the library: Download bkintanar/psgc-api-wrapper library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
bkintanar / psgc-api-wrapper example snippets
use PSGC\Facades\Region;
Region::get(); // Get a Collection of regions
Region::find('070000000'); // Get a specific region
Region::stricts
use PSGC\Facades\District;
District::get(); // Get a Collection of districts
District::find('133900000'); // Get a specific district
District::
use PSGC\Facades\Province;
Province::get(); // Get a Collection of provinces
Province::find('072200000'); // Get a specific province
Province::ction of municipalities
Province:: and municipalities
use PSGC\Facades\City;
City::get(); // Get a Collection of cities
City::find('072217000'); // Get a specific city
City::ollection of sub-municipalities
use PSGC\Facades\Municipality;
Municipality::get(); // Get a Collection of municipalities
Municipality::find('072201000'); // Get a specific municipality
Municipality::
use PSGC\Facades\SubMunicipality;
SubMunicipality::get(); // Get a Collection of sub-municipalities
SubMunicipality::find('133901000'); // Get a specific sub-municipality
SubMunicipality::
use PSGC\Facades\Barangay;
Barangay::get(); // Get a Collection of barangays. advised as this will retrieve all 42,046 barangays.
Barangay::find('072201001'); // Get a specific sub-municipality
SGC\Region;
$region = new Region();
$region->get(); // Get a Collection of regions
$region->find('070000000'); // Get a specific region
$region->