Download the PHP package bkintanar/psgc-api-wrapper without Composer
On this page you can find all versions of the php package bkintanar/psgc-api-wrapper. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download bkintanar/psgc-api-wrapper
More information about bkintanar/psgc-api-wrapper
Files in bkintanar/psgc-api-wrapper
Package psgc-api-wrapper
Short Description PHP Wrapper for Philippine Standard Geographic Code API
License MIT
Informations about the package psgc-api-wrapper
PHP Wrapper for Philippine Standard Geographic Code API
Overview
This package is a simple php wrapper for the PSGC API found here: https://github.com/bkintanar/psgc-api.
Installation
The recommended way to install PSGC API Wrapper is with Composer. Composer is a dependency management tool for PHP that allows you to declare the dependencies your project needs and installs them into your project.
You can add PSGC API Wrapper as a dependency using Composer:
Alternatively, you can specify PSGC API Wrapper as a dependency in your project's existing composer.json file:
Supported Methods
All endpoints provided by https://github.com/bkintanar/psgc-api
are supported.
Using Laravel
Region
Region is the highest geographic level used by The Republic of the Philippines. The Philippines is divided into 17 regions as of 31 March 2020.
District
This geographic level is only used by the National Capital Region (NCR).
Unlike other administrative regions in the Philippines, Metro Manila is not composed of provinces. Instead, the region is divided into four geographic areas called "districts."
So instead of the usual geographic hierarchy of:
The National Capital Region follows the geographic hierarchy of:
Province
One or more provinces belongs to one region. The Philippines is administratively divided into 81 provinces as of 31 March 2020. Any given province has one or more cities, and municipalities under it.
City
One or more cities belongs to one province or district. The Philippines is administratively divided into 146 cities as of 31 March 2020. Any given city has one or more barangays, sub-municipalities under it.
Municipality
One or more municipalities belongs to one Province. The Philippines is administratively divided into 1,488 municipalities as of 31 March 2020. Any given municipality has one or more barangays under it.
Sub Municipality
This geographic level is only used by the National Capital Region (NCR).
As far as NCR is concerned, cities have one or more sub-municipalities and each sub-municipality has one or more barangays.
Barangay
This is the lowest geographic level used by The Philippines. Any given barangay may be under to one city, one municipality, one sub-municipality. As barangay's the lowest geographic level, it doesn't have any geographic level under it, so no valid includes
.
Using Vanilla PHP
Follow the pattern above to use with other geographic levels.
All versions of psgc-api-wrapper with dependencies
illuminate/support Version ^6.0|^7.0|^8.0
ext-json Version *