---
title: "Configuration — Addresses for Laravel | Roundly"
description: "Every config key and its default — the address model, owner key type, default type, country normalisation, resolver and facade alias."
url: https://roundly-consulting.com/open-source/docs/addresses-for-laravel/configuration
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)

# Configuration

The published config/addresses.php in full (comments trimmed):

```php
use RoundlyConsulting\Addresses\Address;
use RoundlyConsulting\Addresses\Enums\AddressType;

return [
    'model' => Address::class,

    'key_type' => env('ADDRESSES_KEY_TYPE', 'bigint'),   // bigint | uuid | ulid

    'default_type' => AddressType::Default->value,

    'normalise_country' => true,

    'country_resolver' => null,

    'facade_alias' => 'Addresses',
];
```

## Every key

| Key | Default | Env | Purpose |
| --- | --- | --- | --- |
| `model` | Address::class | — | The Eloquent model the trait, builder, actions and facade read and write through. Must be the package model or a subclass of it — anything else throws InvalidConfigurationException. |
| `key_type` | bigint | `ADDRESSES_KEY_TYPE` | Key type of the owner models — bigint, uuid or ulid. Types the addressable morph column; set it before you migrate. Matching ignores case and padding; any other value throws InvalidConfigurationException when the migration runs. |
| `default_type` | 'default' | — | The AddressType value an address gets when its creator names none — the builder without type(), AddressData or createAddress() without type. Not set (null or blank) means default; any other value that is not an AddressType case (matching ignores case and padding) throws InvalidAddressTypeException when such an address is built. |
| `normalise_country` | true | — | Trim, upper-case and check that country codes are two or three letters on the way in. false (or 'false', '0', 'off' as a string) stores them as given, trimmed; inCountry() then matches case-insensitively. Any other non-boolean value throws InvalidConfigurationException. |
| `country_resolver` | null | — | Class-string of your CountryResolver, bound as a singleton — resolves country names and lets you geocode. Not set (null or blank) binds none; any other value must name a CountryResolver class, or resolving it throws InvalidConfigurationException. |
| `facade_alias` | 'Addresses' | — | The global alias the service provider registers for the facade. A string renames it; null or a false spelling (false, 0, off, no) skips it — the package declares no other alias. A blank value is not set and keeps Addresses. |

## Environment

Only the owner key type is env-backed — the other keys are literal values you change in the published file:

```bash
ADDRESSES_KEY_TYPE=uuid
```

## default\_type

default\_type is the type an address gets when its creator names none — the fluent builder without ->type(), AddressData without type and createAddress() without type all fall back to it, and a key that is not set (absent, null or blank) means AddressType::Default. It is read when such an address is built — matching ignores case and padding — so any other value that is not an AddressType case (default, billing, shipping, home, work, office) throws InvalidAddressTypeException at that point:

```php
// config/addresses.php
'default_type' => 'billing',

// an address created without a type now gets AddressType::Billing
$customer->newAddress()
    ->in('Bratislava')->at('Somewhere 1')->postalCode('81101')->country('SK')
    ->save();
```

## facade\_alias

Set facade\_alias to another name (for example Locations) to register the facade under that alias, or to null (or a false spelling: false, 0, off, no) to skip the alias entirely; a blank value is not set and keeps Addresses. The alias comes from config only — the package’s composer.json declares none for package discovery — and importing RoundlyConsulting\\Addresses\\Facades\\Addresses works either way.

## 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)
