PHPackages                             sfneal/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. [Database &amp; ORM](/categories/database)
4. /
5. sfneal/address

ActiveLibrary[Database &amp; ORM](/categories/database)

sfneal/address
==============

Add polymorphic 'address' relationships to Eloquent Models in Laravel applications

3.0.0(2y ago)066.8k↓87.5%[2 issues](https://github.com/sfneal/address/issues)[3 PRs](https://github.com/sfneal/address/pulls)6MITPHPPHP ^8.0CI passing

Since Oct 28Pushed 5mo ago1 watchersCompare

[ Source](https://github.com/sfneal/address)[ Packagist](https://packagist.org/packages/sfneal/address)[ Docs](https://github.com/sfneal/address)[ RSS](/packages/sfneal-address/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (10)Dependencies (7)Versions (28)Used By (6)

Address
=======

[](#address)

[![Packagist PHP support](https://camo.githubusercontent.com/8f05178bf824066c0e70ead8314f06b1788af1471d371d3135ab2517f060569e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f73666e65616c2f61646472657373)](https://packagist.org/packages/sfneal/address)[![Latest Version on Packagist](https://camo.githubusercontent.com/c4269a0e34e3d8a656fe05affd95ca0a0be85e3753b81aeeb8f2a88c5dfe7ed1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73666e65616c2f616464726573732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/sfneal/address)[![Build Status](https://camo.githubusercontent.com/64d8fec7ccce62e92c2b99649a6d2c42a4e2ea63956c41fb7d2935477f5c9221/68747470733a2f2f7472617669732d63692e636f6d2f73666e65616c2f616464726573732e7376673f6272616e63683d6d6173746572267374796c653d666c61742d737175617265)](https://travis-ci.com/sfneal/address)[![StyleCI](https://camo.githubusercontent.com/4919c890748ce203727fc59d4717a63d0650725fec234eeddf6217d559410a3f/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3330373735323531322f736869656c643f6272616e63683d6d6173746572)](https://github.styleci.io/repos/307752512?branch=master)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/64fde92c5d2f6b85733c4b210d2c52e86afba05b5b867b7bd51eaade32ec54e8/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f73666e65616c2f616464726573732f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/sfneal/address/?branch=master)[![Total Downloads](https://camo.githubusercontent.com/3b8c38851ff5168870301f3e7ef63b3ede07b6e78e02930046d50e30a89dc4f8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f73666e65616c2f616464726573732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/sfneal/address)

Add polymorphic 'address' relationships to Eloquent Models in Laravel applications.

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

[](#installation)

You can install the package via composer:

```
composer require sfneal/address
```

To make use of database migration, publish the Service Provider.

```
php artisan vendor:publish --provider="Sfneal\Address\Providers\AddressServiceProvider"
```

Usage
-----

[](#usage)

Add a 'address' relationship to an Eloquent Model.

```
use Illuminate\Database\Eloquent\Relations\MorphOne;
use Sfneal\Address\Models\Address;

/**
 * Address relationship.
 *
 * @return MorphOne|Address
 */
public function address()
{
    return $this->morphOne(Address::class, 'addressable');
}
```

### Testing

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

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

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

[](#contributing)

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

Security
--------

[](#security)

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

Credits
-------

[](#credits)

- [Stephen Neal](https://github.com/sfneal)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

PHP Package Boilerplate
-----------------------

[](#php-package-boilerplate)

This package was generated using the [PHP Package Boilerplate](https://laravelpackageboilerplate.com).

###  Health Score

43

—

FairBetter than 90% of packages

Maintenance49

Moderate activity, may be stable

Popularity23

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity70

Established project with proven stability

 Bus Factor1

Top contributor holds 97.3% 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 ~55 days

Recently: every ~243 days

Total

24

Last Release

782d ago

Major Versions

0.5.0 → 1.0.02021-01-29

1.2.13 → 2.0.02024-04-01

2.0.2 → 3.0.02024-05-02

PHP version history (3 changes)0.1.0PHP &gt;=7.1

0.5.0PHP &gt;=7.3

2.0.1PHP ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/ec5fdf3b9d2183ae9c777e4aed46fd5cfd9aa4789cd05c669e5907de0b8c865c?d=identicon)[sfneal](/maintainers/sfneal)

---

Top Contributors

[![sfneal](https://avatars.githubusercontent.com/u/23200215?v=4)](https://github.com/sfneal "sfneal (146 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (4 commits)")

---

Tags

addresssfneal

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[nevadskiy/laravel-geonames

Populate your database using the GeoNames service.

2716.4k](/packages/nevadskiy-laravel-geonames)

PHPackages © 2026

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