PHPackages                             bazuka/filament-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. [Utility &amp; Helpers](/categories/utility)
4. /
5. bazuka/filament-address

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

bazuka/filament-address
=======================

A Filament plugin for Danish address autocomplete

v2.0.0(2w ago)02MITPHPPHP ^8.2

Since Apr 28Pushed 1w agoCompare

[ Source](https://github.com/BazukaDK/filament-address)[ Packagist](https://packagist.org/packages/bazuka/filament-address)[ RSS](/packages/bazuka-filament-address/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (5)Versions (4)Used By (0)

Filament Address
================

[](#filament-address)

A Filament v5 plugin that integrates the Danish [Adressevælger API](https://adressevaelger.dk) into your Filament forms. Provides an autocomplete input field for Danish addresses, backed by a polymorphic `Address` model.

Requirements
------------

[](#requirements)

- PHP 8.2+
- Laravel 11.28+
- Filament 5+

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

[](#installation)

Install via Composer:

```
composer require bazuka/filament-address
```

Publish and run the migration:

```
php artisan vendor:publish --tag=filament-address-migrations
php artisan migrate
```

Optionally publish the config:

```
php artisan vendor:publish --tag=filament-address-config
```

Add your API token to `.env`:

```
FILAMENT_ADDRESS_API_TOKEN=your-token-here
```

Obtain a token from [adressevaelger.dk](https://adressevaelger.dk) or your administrator.

### Custom Theme (required)

[](#custom-theme-required)

This plugin uses Tailwind CSS utility classes, so your Filament panel must have a custom theme. If you haven't created one yet:

```
php artisan make:filament-theme
```

Follow the output instructions to register the theme in your panel provider, then add the plugin's views as a Tailwind source in the generated theme CSS file (e.g. `resources/css/filament/admin/theme.css`):

```
@source '../../../../vendor/bazuka/filament-address/resources/views/**/*';
```

Then rebuild your assets:

```
npm run build
```

### Register the plugin in your Filament panel provider:

[](#register-the-plugin-in-your-filament-panel-provider)

```
use Bazuka\FilamentAddress\FilamentAddressPlugin;

public function panel(Panel $panel): Panel
{
    return $panel
        ->plugins([
            FilamentAddressPlugin::make(),
        ]);
}
```

Usage
-----

[](#usage)

### 1. Prepare your model

[](#1-prepare-your-model)

Add the `HasAddresses` trait to any Eloquent model that should have addresses:

```
use Bazuka\FilamentAddress\Concerns\HasAddresses;

class Customer extends Model
{
    use HasAddresses;
}
```

This gives the model two relationships:

MethodReturnsDescription`address()``MorphOne`The primary (first) address`addresses()``MorphMany`All addresses### 2. Add the form field

[](#2-add-the-form-field)

Use `AddressInput` in any Filament form. When the user picks a suggestion, the address is automatically saved via the `HasAddresses` trait:

```
use Bazuka\FilamentAddress\Forms\Components\AddressInput;

AddressInput::make('address')
    ->label('Address')
    ->placeholder('Start typing an address…')
    ->suggestionCount(8),
```

The field calls the Adressevælger API directly from the browser as the user types (debounced at 300 ms).

### 3. Reading the stored address

[](#3-reading-the-stored-address)

```
$customer = Customer::with('address')->find($id);

$customer->address->formatted_address; // "Amaliegade 18, 1256 København K"
$customer->address->street_name;       // "Amaliegade"
$customer->address->postal_code;       // "1256"
$customer->address->city;              // "København K"
```

Available Address Attributes
----------------------------

[](#available-address-attributes)

AttributeTypeDescription`source_id`string (UUID)Adressevælger unique address identifier`formatted_address`stringFull formatted address string`street_name`stringStreet name`house_number`stringHouse number`floor`string|nullFloor`door`string|nullDoor`postal_code`stringPostal code`city`stringCity name`municipality_code`stringMunicipality code`longitude`float|nullLongitude`latitude`float|nullLatitude`access_address_id`string|nullAssociated house number identifier`label`string|nullOptional label (e.g. `billing`, `shipping`)Configuration
-------------

[](#configuration)

```
// config/filament-address.php
return [
    'address_model' => \Bazuka\FilamentAddress\Models\Address::class,
    'api_token'     => env('FILAMENT_ADDRESS_API_TOKEN', ''),
];
```

You can swap in your own model as long as it extends `Bazuka\FilamentAddress\Models\Address`:

```
'address_model' => \App\Models\Address::class,
```

AddressService
--------------

[](#addressservice)

For programmatic address lookup outside of forms:

```
use Bazuka\FilamentAddress\Services\AddressService;

// Returns up to $count suggestions from the search endpoint
$suggestions = AddressService::addressAutocomplete('Amalieg', 5);

// Fetches the full address record for a given address ID
$adresse = AddressService::addressById('d632f4fc-8190-4462-846d-47391e9a9afe');

// Returns the full address record for the single best text match, or null
$match = AddressService::bestAddressMatch('Amaliegade 18, København');
```

License
-------

[](#license)

MIT — see [LICENSE](LICENSE).

###  Health Score

40

—

FairBetter than 86% of packages

Maintenance97

Actively maintained with recent releases

Popularity2

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~11 days

Total

3

Last Release

19d ago

Major Versions

v1.0.1 → v2.0.02026-05-21

### Community

Maintainers

![](https://www.gravatar.com/avatar/2996d9b9b65e10b5499406a9c8d7be0fca00dab868e7861475eb79a7377afcc8?d=identicon)[Bazuka](/maintainers/Bazuka)

---

Top Contributors

[![ThorNissen](https://avatars.githubusercontent.com/u/15191526?v=4)](https://github.com/ThorNissen "ThorNissen (29 commits)")

---

Tags

laraveladdressfilamentdanish-addresses

###  Code Quality

TestsPest

### Embed Badge

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

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

###  Alternatives

[ysfkaya/filament-phone-input

A phone input component for Laravel Filament

3131.2M25](/packages/ysfkaya-filament-phone-input)[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3913.7k](/packages/rawilk-profile-filament-plugin)[tapp/filament-google-autocomplete-field

Filament plugin that provides a Google Autocomplete field

30122.2k](/packages/tapp-filament-google-autocomplete-field)[dotswan/filament-map-picker

Easily pick and retrieve geo-coordinates using a map-based interface in your Filament applications.

127173.7k3](/packages/dotswan-filament-map-picker)[stephenjude/filament-feature-flags

Filament implementation of feature flags and segmentation with Laravel Pennant.

122157.7k1](/packages/stephenjude-filament-feature-flags)[creagia/filament-code-field

A Filamentphp input field to edit or view code data.

57301.3k3](/packages/creagia-filament-code-field)

PHPackages © 2026

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