PHPackages                             jsdecena/mcpro - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. jsdecena/mcpro

ActiveLibrary

jsdecena/mcpro
==============

Municipalities, Cities and Provinces package for the Philippines.

1.1.0(8y ago)2333.0k↓44.4%7[1 issues](https://github.com/jsdecena/mcpro/issues)1MITPHP

Since Jul 8Pushed 4y ago1 watchersCompare

[ Source](https://github.com/jsdecena/mcpro)[ Packagist](https://packagist.org/packages/jsdecena/mcpro)[ RSS](/packages/jsdecena-mcpro/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (7)Used By (1)

[![Total Downloads](https://camo.githubusercontent.com/12504bcb61e6b0b54731378f3535a778ed00181779efc59ae3a9802fe482fc80/68747470733a2f2f706f7365722e707567782e6f72672f6a73646563656e612f6d6370726f2f646f776e6c6f616473)](https://packagist.org/packages/jsdecena/mcpro)[![Latest Stable Version](https://camo.githubusercontent.com/bf7a97bdc80915a1216f50767de90c0b636117cf2d34fab617714ab92b01bbf5/68747470733a2f2f706f7365722e707567782e6f72672f6a73646563656e612f6d6370726f2f762f737461626c65)](https://packagist.org/packages/jsdecena/mcpro)[![License](https://camo.githubusercontent.com/31f281fd6c6bf11513bcc79935c94b61673364b010f55d3ecbe61b2e9ac3c519/68747470733a2f2f706f7365722e707567782e6f72672f6a73646563656e612f6d6370726f2f6c6963656e7365)](https://packagist.org/packages/jsdecena/mcpro)[![Monthly Downloads](https://camo.githubusercontent.com/e6cd1e9908d9866ee4d5246e46d5fda870a5bba8358d6876c743ab4b3459193d/68747470733a2f2f706f7365722e707567782e6f72672f6a73646563656e612f6d6370726f2f642f6d6f6e74686c79)](https://packagist.org/packages/jsdecena/mcpro)

MCPro is abbreviation of Municipalities, Cities and Provinces in the Philippines
--------------------------------------------------------------------------------

[](#mcpro-is-abbreviation-of-municipalities-cities-and-provinces-in-the-philippines)

### A basic RESTful API for getting all the cities, municipality and provinces in the Philippines.

[](#a-basic-restful-api-for-getting-all-the-cities-municipality-and-provinces-in-the-philippines)

### Installation

[](#installation)

- Step1: Add this to your root `composer.json`

```
	"require": {
	    "jsdecena/mcpro": "1.1.*"
	}
```

- Step2: Add this to your `config/app.php` in `providers` array

```
	'providers' => [
	    Jsdecena\MCPro\McproServiceProvider::class,
	]
```

- Step3: Run this in your terminal `php artisan vendor:publish`
- Step4: Rename `.env.example` to `.env` and set your database credentials
- Step5: Run this in your terminal `php artisan key:generate`
- Step6: Add these lines in the `/database/seeds/DatabaseSeeder.php`

```
    $this->call('CountryTableSeeder');
    $this->call('ProvincesTableSeeder');
    $this->call('CitiesTableSeeder');
    $this->call('BarangayTableSeeder');
```

- Step7: Run this in your terminal `composer dump-autoload && php artisan migrate --seed && php artisan serve`
- Step8: Go to
- Enjoy!

### Endpoints

[](#endpoints)

- `/api/v1/country` - List all the countries
- `/api/v1/country/{country_id}` - Details of the country ( PH is id:169 )
- `/api/v1/country/{country_id}/province` - List all the provinces of the country (Currently for the PH)
- `/api/v1/country/{country_id}/province/{province_id}` - Details of the province
- `/api/v1/country/{country_id}/province/{province_id}/city` - Cities ( and Municipalities) of the province
- `/api/v1/country/{country_id}/province/{province_id}/city/{city_id}` - Details of the city
- `/api/v1/country/{country_id}/province/{province_id}/city/{city_id}/barangay` - List all the barangays of the City (or Municipality)

### Future

[](#future)

- Reverse lookup - Giving the `city_id` and shows the `province` and the country etc.
- 404 Exception handling

### Credits:

[](#credits)

- Oj Tibi on [PH Provinces and Cities](https://github.com/ojtibi/philippine-provinces-and-cities-sql) for the data.
- Eacomm on [PH Barangays](http://blog.eacomm.com/archives/554/philippine-barangays-lookup-table) - for the list of barangays in the Philippines.

### DISCLAIMER

[](#disclaimer)

> The data is offered FOR FREE and anybody can use at their own risk. The data is offered AS IS. While I will strive to keep this data up to date, I do not claim that this is a comprehensive listing and some data may be outdated or missing. I will not be held liable for any inaccuracies or errors found in the data. I am not responsible for final end-user utilization of this data and any damages the user might incur in its use.

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity37

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~68 days

Recently: every ~85 days

Total

6

Last Release

3263d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2285625?v=4)[Jeff Decena](/maintainers/jsdecena)[@jsdecena](https://github.com/jsdecena)

---

Top Contributors

[![jsdecena](https://avatars.githubusercontent.com/u/2285625?v=4)](https://github.com/jsdecena "jsdecena (8 commits)")

### Embed Badge

![Health badge](/badges/jsdecena-mcpro/health.svg)

```
[![Health](https://phpackages.com/badges/jsdecena-mcpro/health.svg)](https://phpackages.com/packages/jsdecena-mcpro)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
