PHPackages                             sportscar03/laravel-address - 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. [API Development](/categories/api)
4. /
5. sportscar03/laravel-address

ActiveLibrary[API Development](/categories/api)

sportscar03/laravel-address
===========================

Philippines Address Lookup API for Laravel.

014PHP

Since Oct 26Pushed 1y agoCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

Philippines Address Lookup for Laravel
======================================

[](#philippines-address-lookup-for-laravel)

[![Latest Version on Packagist](https://camo.githubusercontent.com/1c4b1333535ab41e25a5c6864e6376031028e8215c190356ef214e19f6b75e1a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f79616a72612f6c61726176656c2d616464726573732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/yajra/laravel-address)[![Continuous Integration](https://github.com/yajra/laravel-address/actions/workflows/continuous-integration.yml/badge.svg)](https://github.com/yajra/laravel-address/actions/workflows/continuous-integration.yml)[![Static Analysis](https://github.com/yajra/laravel-address/actions/workflows/static-analysis.yml/badge.svg)](https://github.com/yajra/laravel-address/actions/workflows/static-analysis.yml)[![Quality Score](https://camo.githubusercontent.com/d191927d89669ce88a7179663658e395430166b091d1884dff085c295aa6b313/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f79616a72612f6c61726176656c2d616464726573732e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/yajra/laravel-address)[![Total Downloads](https://camo.githubusercontent.com/ada6b9f62739652a3f64acba3e5ab9afde9bc93cd559f6d5ace956db3ebed0db/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f79616a72612f6c61726176656c2d616464726573732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/yajra/laravel-address)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)

A package for providing Philippines Address lookup API with Laravel.

Installation
------------

[](#installation)

```
composer require sportscar03/laravel-address:dev-master
```

### Register service provider (Optional on Laravel 5.5+)

[](#register-service-provider-optional-on-laravel-55)

```
Sportscar03\Address\AddressServiceProvider::class
```

### Publish config (Optional)

[](#publish-config-optional)

```
php artisan vendor:publish --tag=address --force
```

Available Config
----------------

[](#available-config)

`address.prefix` To change the API base route.

`address.middleware` Route middleware.

Required Setup (Migration and Seeder)
-------------------------------------

[](#required-setup-migration-and-seeder)

- Run the address migration.

```
php artisan migrate
```

- Run the address seeder.

```
php artisan db:seed Sportscar03\\Address\\Seeders\\AddressSeeder
```

Routes
------

[](#routes)

The default prefix for the api routes is `/api/v1/address`. The default can be updated via config `address.php` file.

- Get All Regions `/api/v1/address/regions`.
- Get All Provinces `/api/v1/address/provinces`.
- Get Provinces By Region `/api/v1/address/provinces/{regionId}`.
- Get Cities By Province `/api/v1/address/cities/{provinceId}`.
- Get Barangays By City `/api/v1/address/barangays/{cityId}`.

Usage / Examples
----------------

[](#usage--examples)

### Add address migration

[](#add-address-migration)

Add address migration using `$table->address()`. This will add the following fields:

- street
- barangay\_id
- city\_id
- province\_id
- region\_id

### Include built-in form (Requires jQuery)

[](#include-built-in-form-requires-jquery)

On your view, include `@include('address::form', ['model' => $modelWithAddress])`

### Add scripts section on your master layout.

[](#add-scripts-section-on-your-master-layout)

Before the end of body tag, include `@stack('scripts')`.

```

-- Contents Here ---

@stack('scripts')

```

Model with Address Integration
------------------------------

[](#model-with-address-integration)

Just use `Sportscar03\Address\HasAddress` trait on your model to load address models relationship.

```
use Sportscar03\Address\HasAddress;

class User extends Model {
    use HasAddress;
}
```

Change log
----------

[](#change-log)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) and [CONDUCT](CONDUCT.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Arjay Angeles](https://github.com/yajra)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

15

—

LowBetter than 3% of packages

Maintenance29

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity16

Early-stage or recently created project

 Bus Factor1

Top contributor holds 95.6% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/46d123fbb816cbea666052cbf9c90aea365bff26464ba1ee08f0938352aa184c?d=identicon)[0xjs0nd3v](/maintainers/0xjs0nd3v)

---

Top Contributors

[![yajra](https://avatars.githubusercontent.com/u/2687997?v=4)](https://github.com/yajra "yajra (109 commits)")[![sportscar03](https://avatars.githubusercontent.com/u/47841878?v=4)](https://github.com/sportscar03 "sportscar03 (4 commits)")[![BrylleBaliton](https://avatars.githubusercontent.com/u/92550259?v=4)](https://github.com/BrylleBaliton "BrylleBaliton (1 commits)")

### Embed Badge

![Health badge](/badges/sportscar03-laravel-address/health.svg)

```
[![Health](https://phpackages.com/badges/sportscar03-laravel-address/health.svg)](https://phpackages.com/packages/sportscar03-laravel-address)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M454](/packages/google-gax)

PHPackages © 2026

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