---
title: "Installation — Addresses for Laravel | Roundly"
description: "Install via Composer, publish and run the addresses migration (set a UUID or ULID key type first), and optionally publish config/addresses.php."
url: https://roundly-consulting.com/open-source/docs/addresses-for-laravel/installation
language: en
---

[All packages](https://roundly-consulting.com/open-source.md)

[Addresses for Laravel](https://roundly-consulting.com/open-source/docs/addresses-for-laravel.md)

# Installation

Require the package. The service provider is auto-discovered and registers the Addresses facade alias from config — no manual registration:

```bash
composer require roundly-consulting/addresses-for-laravel
```

## Publish and run the migration

The migration is publish-only: the package never loads it, so php artisan migrate creates nothing until you have published it. It lands in database/migrations with a timestamp, the published copy is yours to edit, and republishing with --force overwrites that same file instead of adding a second copy:

```bash
php artisan vendor:publish --tag="addresses-migrations"
php artisan migrate
```

If the models that will own addresses use UUID or ULID primary keys, set ADDRESSES\_KEY\_TYPE before you run the migration — the key type is baked into the addressable column (see Database schema & key types).

## Publish the config (optional)

Every key has a working default, so you only publish config/addresses.php to change one:

```bash
php artisan vendor:publish --tag="addresses-config"
```

The package exposes exactly two publish tags — addresses-migrations and addresses-config. It ships no routes, views, translations or Artisan commands.

## Check the setup

The package adds an Addresses section to php artisan about — the model, table, default type, whether country normalisation is on, the resolver’s class base name (or NONE) and the facade alias (or DISABLED); a misconfigured model, default type, normalise\_country, resolver or alias shows as INVALID instead of failing the command. Stored addresses never appear there:

```bash
php artisan about --only=addresses
```

## Next steps

- Add the HasAddresses trait to every model that owns addresses.
- Create addresses with the fluent builder or an AddressData DTO.
- Read them back with primaryAddress(), addressesOfType() or the query scopes.

## Show your open-source love

This package is free and MIT-licensed. If it saves you time, a one-off donation or a Patreon membership keeps it maintained, tested and documented.

[More ways to support, including crypto](https://roundly-consulting.com/support-us.md)

By donating, you agree to our [donation terms](https://roundly-consulting.com/donation-terms.md).

[Support our open source work (opens in a new tab)](https://donate.stripe.com/dRmeVe8FX5PF1Qd9pXcEw00) [Join us on Patreon (opens in a new tab)](https://www.patreon.com/cw/roundly)

## Want this built into your product?

We integrate our packages into custom Laravel and AI builds. Tell us what you're working on and we'll reply within 48 hours.

[Get a quote in 48 hours](https://roundly-consulting.com/contact.md) [Browse all packages](https://roundly-consulting.com/open-source/docs/addresses-for-laravel.md)
