PHPackages                             yajra/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. yajra/laravel-address

ActiveLibrary[API Development](/categories/api)

yajra/laravel-address
=====================

Philippines Address Lookup API for Laravel.

v13.0.0(3w ago)4119.4k↑81.3%19[3 issues](https://github.com/yajra/laravel-address/issues)[1 PRs](https://github.com/yajra/laravel-address/pulls)MITPHPPHP ^8.3CI passing

Since Jun 7Pushed 3w ago4 watchersCompare

[ Source](https://github.com/yajra/laravel-address)[ Packagist](https://packagist.org/packages/yajra/laravel-address)[ Docs](https://github.com/yajra/laravel-address)[ GitHub Sponsors](https://github.com/sponsors/yajra)[ RSS](/packages/yajra-laravel-address/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (10)Dependencies (24)Versions (30)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)

> **Requires Laravel 13+**

A package for providing Philippines Address lookup API with Laravel.

Version Compatibility
---------------------

[](#version-compatibility)

LaravelPackage11.x11.x12.x12.x13.x13.xInstallation
------------

[](#installation)

```
composer require yajra/laravel-address
```

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

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

```
Yajra\Address\AddressServiceProvider::class
```

### Publish config (Optional)

[](#publish-config-optional)

```
php artisan vendor:publish
```

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 Yajra\\Address\\Seeders\\AddressSeeder
```

Routes
------

[](#routes)

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

- Get All Regions `/api/address/regions`.
- Get All Provinces `/api/address/provinces`.
- Get Provinces By Region `/api/address/provinces/{regionId}`.
- Get Cities By Province `/api/address/cities/{provinceId}`.
- Get Barangays By City `/api/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 `Yajra\Address\HasAddress` trait on your model to load address models relationship.

```
use Yajra\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

65

—

FairBetter than 99% of packages

Maintenance93

Actively maintained with recent releases

Popularity41

Moderate usage in the ecosystem

Community18

Small or concentrated contributor base

Maturity89

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 97.9% 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 ~108 days

Recently: every ~138 days

Total

28

Last Release

26d ago

Major Versions

v0.7.0 → v10.0.02024-03-02

v10.0.1 → v11.0.02024-04-15

11.x-dev → v12.0.02024-10-23

v12.2.0 → v13.0.02026-06-08

PHP version history (4 changes)v0.1.0PHP &gt;=7.0

v10.0.0PHP ^8.1

v11.0.0PHP ^8.2

v13.0.0PHP ^8.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/8c245d1effe6022f9f09b2e8b9cce26743de03a64d612cea4ce9885560d7c0b2?d=identicon)[yajra](/maintainers/yajra)

---

Top Contributors

[![yajra](https://avatars.githubusercontent.com/u/2687997?v=4)](https://github.com/yajra "yajra (140 commits)")[![BrylleBaliton](https://avatars.githubusercontent.com/u/92550259?v=4)](https://github.com/BrylleBaliton "BrylleBaliton (1 commits)")[![emmanuelarturo](https://avatars.githubusercontent.com/u/61183606?v=4)](https://github.com/emmanuelarturo "emmanuelarturo (1 commits)")[![nikoolz](https://avatars.githubusercontent.com/u/167667339?v=4)](https://github.com/nikoolz "nikoolz (1 commits)")

---

Tags

addressapihacktoberfestlaravellookupphplaraveladdressyajra

###  Code Quality

TestsPest

Static AnalysisPHPStan, Rector

Code StyleLaravel Pint

### Embed Badge

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

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

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[laravel/cashier

Laravel Cashier provides an expressive, fluent interface to Stripe's subscription billing services.

2.6k29.9M146](/packages/laravel-cashier)[api-platform/laravel

API Platform support for Laravel

58171.6k14](/packages/api-platform-laravel)[laravel/pulse

Laravel Pulse is a real-time application performance monitoring tool and dashboard for your Laravel application.

1.7k15.1M132](/packages/laravel-pulse)[yajra/laravel-oci8

Oracle DB driver for Laravel via OCI8

8793.2M25](/packages/yajra-laravel-oci8)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9762.4M131](/packages/roots-acorn)

PHPackages © 2026

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