A FilamentPHP plugin that validates Duthc, Belgium and German postal codes and automatically fills address fields (street, neighborhood, city, state, country) using Pro6pp as the primary source.
syzygymedia/filament-pro6pp-autocomplete is a Laravel package for a filamentphp plugin that validates duthc, belgium and german postal codes and automatically fills address fields (street, neighborhood, city, state, country) using pro6pp as the primary source..
It currently has 0 GitHub stars and 4 downloads on Packagist.
Install it with composer require syzygymedia/filament-pro6pp-autocomplete.
Discover more Laravel packages by syzygymedia
or browse all Laravel packages to compare alternatives.
Last updated
A clean and simple Filament v4 plugin that integrates Pro6PP postal code autocomplete functionality. This plugin provides seamless address lookup with support for multiple European countries.

Install the package via Composer:
composer require syzygy/filament-pro6pp-autocomplete
Publish the configuration file:
php artisan vendor:publish --tag="filament-pro6pp-config"
Add your Pro6PP API key to your .env file:
PRO6PP_API_KEY=your-api-key-here
For the Netherlands, postal code AND street number are required:
use Syzygy\FilamentPro6pp\Forms\Components\Pro6ppAutocomplete;
use Syzygy\FilamentPro6pp\Enums\Pro6ppLanguage;
use Filament\Forms\Components\TextInput;
public function form(Form $form): Form
{
return $form->schema([
Pro6ppAutocomplete::make('postal_code')
->language(Pro6ppLanguage::NL),
TextInput::make('street_number')
->label('House Number')
->required(), // Required for NL lookups
// These fields will be auto-filled when the search button is clicked
TextInput::make('street')->label('Street'),
TextInput::make('settlement')->label('City'),
TextInput::make('municipality')->label('Municipality'),
TextInput::make('province')->label('Province'),
]);
}
use Syzygy\FilamentPro6pp\Forms\Components\Pro6ppAutocomplete;
use Syzygy\FilamentPro6pp\Enums\Pro6ppLanguage;
use Filament\Forms\Components\TextInput;
public function form(Form $form): Form
{
return $form->schema([
Pro6ppAutocomplete::make('address_lookup')
->language(Pro6ppLanguage::NL)
->bindStreet('street')
->bindStreetNumber('street_number')
->bindSettlement('settlement')
->bindProvince('province')
->bindPostalCode('postal_code')
->bindCountry('country')
->bindCountryCode('country_code')
->bindLat('latitude')
->bindLng('longitude')
->nextFocusField('street_number'),
TextInput::make('street_number')
->label('House Number')
->required(), // Required for NL lookups
// These fields will be auto-filled after lookup
TextInput::make('street')->label('Street'),
TextInput::make('settlement')->label('City'),
TextInput::make('municipality')->label('Municipality'),
TextInput::make('province')->label('Province'),
TextInput::make('country')->label('Country'),
TextInput::make('country_code')->label('Country Code'),
TextInput::make('latitude')->label('Latitude'),
TextInput::make('longitude')->label('Longitude'),
]);
}
For Belgium and Luxembourg, the user must also enter a street name before searching:
use Syzygy\FilamentPro6pp\Forms\Components\Pro6ppAutocomplete;
use Syzygy\FilamentPro6pp\Enums\Pro6ppLanguage;
use Filament\Forms\Components\TextInput;
public function form(Form $form): Form
{
return $form->schema([
Pro6ppAutocomplete::make('postal_code')
->language(Pro6ppLanguage::BE) // or Pro6ppLanguage::LU
->streetField('street'), // Tell component where to find street input
TextInput::make('street')->label('Street')->required(),
// These fields will be auto-filled
TextInput::make('street_number')->label('House Number'),
TextInput::make('settlement')->label('City'),
TextInput::make('municipality')->label('Municipality'),
]);
}
For these countries, users must enter postal code, city, and street:
use Syzygy\FilamentPro6pp\Forms\Components\Pro6ppAutocomplete;
use Syzygy\FilamentPro6pp\Enums\Pro6ppLanguage;
use Filament\Forms\Components\TextInput;
public function form(Form $form): Form
{
return $form->schema([
Pro6ppAutocomplete::make('postal_code')
->language(Pro6ppLanguage::DE) // or FR, DK, AT, CH
->settlementField('settlement') // Where to find city
->streetField('street'), // Where to find street
TextInput::make('settlement')->label('City')->required(),
TextInput::make('street')->label('Street')->required(),
// These fields will be auto-filled
TextInput::make('street_number')->label('House Number'),
TextInput::make('municipality')->label('Municipality'),
TextInput::make('state')->label('State'),
]);
}
language(Pro6ppLanguage|string $language)Set the country/language for the autocomplete service.
Pro6ppAutocomplete::make('postal_code')
->language(Pro6ppLanguage::NL)
settlementField(?string $field)For countries requiring city input (DE, FR, DK, AT, CH), specify which form field contains the city/settlement.
Pro6ppAutocomplete::make('postal_code')
->language(Pro6ppLanguage::DE)
->settlementField('city') // Read from 'city' field
streetField(?string $field)For countries requiring street input (BE, LU, DE, FR, DK, AT, CH), specify which form field contains the street.
Pro6ppAutocomplete::make('postal_code')
->language(Pro6ppLanguage::BE)
->streetField('street_name') // Read from 'street_name' field
nextFocusField(?string $field)Set which field should receive focus after successful lookup (default: 'street_number').
Pro6ppAutocomplete::make('postal_code')
->nextFocusField('house_number')
By default, the component maps API responses to standard field names. Customize mappings with these methods:
bindPostalCode(string $field) - Default: 'postal_code'bindStreet(string $field) - Default: 'street'bindStreetNumber(string $field) - Default: 'street_number'bindPremise(string $field) - Default: 'premise'bindSettlement(string $field) - Default: 'settlement'bindCountry(string $field) - Default: 'country'bindCountryCode(string $field) - Default: 'country_code'bindLat(string $field) - Default: 'lat'bindLng(string $field) - Default: 'lng'bindNeighbourhood(string $field) - NL: NeighborhoodbindDistrict(string $field) - NL, LU, DE, AT, CH: DistrictbindMunicipality(string $field) - NL, BE, LU, DE, DK, AT, CH: MunicipalitybindProvince(string $field) - NL, BE, DK: ProvincebindRegion(string $field) - BE, FR, DK: RegionbindBox(string $field) - BE: Box numberbindBoxPrefix(string $field) - BE: Box prefixbindCanton(string $field) - LU, CH: CantonbindDepartment(string $field) - FR: DepartmentbindCommune(string $field) - FR: CommunebindState(string $field) - DE, AT: State/BundeslandPro6ppAutocomplete::make('zip_code')
->language(Pro6ppLanguage::NL)
->bindPostalCode('zip_code') // Map to 'zip_code' instead of 'postal_code'
->bindStreet('address_line_1') // Map to 'address_line_1'
->bindSettlement('city_name') // Map to 'city_name'
->bindProvince('province_name') // Map to 'province_name'
->nextFocusField('house_nr') // Focus 'house_nr' field after lookup
Set helperThe component extends Filament's TextInput and uses suffixAction() to add a search button. The action closure receives the Set $set helper, which is used to update other form fields - this is the standard Filament pattern (inspired by filament-smart-cep).
protected function setUp(): void
{
parent::setUp();
$this->suffixAction(
fn (): Action => Action::make('pro6ppLookup')
->icon('heroicon-o-magnifying-glass')
->action(function (Livewire $livewire, Set $set) {
// Validate, call API, update fields with $set()
})
);
}
Different countries have different lookup requirements:
| Country | Code | Postal Format | Required Fields | Additional Data | | ------------- | ---- | ----------------------------- | --------------------------- | ---------------------- | | π³π± Netherlands | NL | 1234AB (4 digits + 2 letters) | Postal code + Street number | Neighborhood, District | | π§πͺ Belgium | BE | 1234 (4 digits) | Postal code + Street | Box number, Region | | π±πΊ Luxembourg | LU | 1234 (4 digits) | Postal code + Street | Canton, District | | π©πͺ Germany | DE | 12345 (5 digits) | Postal code + City + Street | State (Bundesland) | | π«π· France | FR | 12345 (5 digits) | Postal code + City + Street | Department, Region | | π©π° Denmark | DK | 1234 (4 digits) | Postal code + City + Street | Region | | π¦πΉ Austria | AT | 1234 (4 digits) | Postal code + City + Street | State (Bundesland) | | π¨π Switzerland | CH | 1234 (4 digits) | Postal code + City + Street | Canton |
The component automatically applies input masks based on the selected country:
9999aa (e.g., 1012AB)99999 (e.g., 10115)9999 (e.g., 1000)Pro6ppService handles all backend validation:
The plugin provides comprehensive error handling with user-friendly notifications:
Netherlands (NL):
Postal code: 1012AB β Amsterdam addresses
Belgium (BE):
Postal code: 1000
Street: Wetstraat β Brussels addresses
Germany (DE):
Postal code: 10115
City: Berlin
Street: Unter den Linden
France (FR):
Postal code: 75001
City: Paris
Street: Rue de Rivoli
Backend: Laravel + Filament v4
Component: Extends Filament\Forms\Components\TextInput
Action Pattern: Uses suffixAction() with Set $set helper
API: Pro6PP v2 REST API with HTTP Client
Unlike many Filament plugins, this package doesn't require custom Blade views. It uses Filament's native TextInput with a suffixAction, making it simple, maintainable, and future-proof.
User fills fields β Clicks suffix button β Filament validates
β Action closure executes β Reads form values via data_get()
β Calls Pro6ppService β HTTP request to Pro6PP API
β Response formatted β $set() updates form fields β Optional auto-focus
Please see CHANGELOG for recent changes.
The MIT License (MIT). Please see License File for more information.