PHPackages                             marshmallow/address-prefiller - 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. marshmallow/address-prefiller

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

marshmallow/address-prefiller
=============================

This package will get the full address information based on the zipcode and house number. Currently online dutch addresses are supported.

v2.3.0(3mo ago)06.6k↓68.1%[4 PRs](https://github.com/marshmallow-packages/address-prefiller/pulls)MITVuePHP &gt;=7.1.0CI failing

Since Sep 3Pushed 1w ago1 watchersCompare

[ Source](https://github.com/marshmallow-packages/address-prefiller)[ Packagist](https://packagist.org/packages/marshmallow/address-prefiller)[ RSS](/packages/marshmallow-address-prefiller/feed)WikiDiscussions main Synced 2d ago

READMEChangelog (4)DependenciesVersions (25)Used By (0)

[![alt text](https://camo.githubusercontent.com/f5450f299f5713ce2f04dd5a1ba7ce9960ed4568b3574e4c4ee3cddc75477253/68747470733a2f2f6d617273686d616c6c6f772e6465762f63646e2f6d656469612f6c6f676f2d7265642d3233377834362e706e67 "marshmallow.")](https://camo.githubusercontent.com/f5450f299f5713ce2f04dd5a1ba7ce9960ed4568b3574e4c4ee3cddc75477253/68747470733a2f2f6d617273686d616c6c6f772e6465762f63646e2f6d656469612f6c6f676f2d7265642d3233377834362e706e67)

Laravel Address Prefiller
=========================

[](#laravel-address-prefiller)

[![Latest Version on Packagist](https://camo.githubusercontent.com/90a10fc24ab152dfda352a8e51e1ef723fc3df060e907da82ff9a0757d17af70/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d617273686d616c6c6f772f616464726573732d70726566696c6c65722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/marshmallow/address-prefiller)[![Tests](https://camo.githubusercontent.com/1d6d91a8435641e97265a5c624bb4c44e21e7596515f7852ece53fb574f603a4/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6d617273686d616c6c6f772d7061636b616765732f616464726573732d70726566696c6c65722f7068702d73796e7461782d636865636b65722e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/marshmallow-packages/address-prefiller/actions/workflows/php-syntax-checker.yml)[![Total Downloads](https://camo.githubusercontent.com/d0d584e75e7ed952b8264562b3a2f28d6e31ee913504a82f18d9548a4e0eea04/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d617273686d616c6c6f772f616464726573732d70726566696c6c65722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/marshmallow/address-prefiller)[![Issues](https://camo.githubusercontent.com/dcb90124401811585fb68f027dcc3e956a0b8d809c5e3772c679d222aba44ca5/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f6d617273686d616c6c6f772d7061636b616765732f616464726573732d70726566696c6c6572)](https://github.com/marshmallow-packages/address-prefiller/issues)[![License](https://camo.githubusercontent.com/ba5a8d2f3015d63b6a1e6b3bf7470cb9c532f8248444bef3087d7584f1f24eb2/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6d617273686d616c6c6f772d7061636b616765732f616464726573732d70726566696c6c6572)](https://github.com/marshmallow-packages/address-prefiller/blob/main/LICENSE.md)

This package prefills address fields based on a provided zipcode and house number. It currently only supports Dutch addresses. You can use it in your custom applications, or use the ready-made field with Laravel Nova.

The address data is retrieved from the official open API provided by the Dutch government (PDOK Locatieserver), which should contain the latest information.

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

[](#installation)

Install the package via Composer:

```
composer require marshmallow/address-prefiller
```

The service provider (`Marshmallow\Zipcode\FieldServiceProvider`) is auto-discovered by Laravel, so there is nothing else to register.

Usage in Nova
-------------

[](#usage-in-nova)

A custom Laravel Nova field is available which you can use. It works very similarly to the Laravel Place field. The difference is that this field does not talk to Algolia, but to the official open API provided by the Dutch government, which should contain the latest information.

```
use Marshmallow\Zipcode\Nova\Zipcode;

public function fields(Request $request)
{
    return [
        ID::make()->sortable(),
        $this->addressFields(),
    ];
}

protected function addressFields()
{
    return $this->merge([
        Zipcode::make(__('Zipcode prefiller'), __('Zipcode'), __('Housenumber'))
            /**
             * Let the package know which columns are connected to
             * the fields. The default values are commented after each
             * function call. If your column names match these defaults,
             * you don't need to call all these functions.
             */
            ->zipcode('zipcode')         // default: zipcode
            ->housenumber('housenumber') // default: housenumber
            ->street('street')           // default: street
            ->city('city')               // default: city
            ->province('province')       // default: province
            ->country('country')         // default: country
            ->latitude('latitude')       // default: latitude
            ->longitude('longitude'),    // default: longitude

        /**
         * The fields below will all be prefilled with the collected
         * data if we find a match on the submitted zipcode and house number.
         */
        Hidden::make(__('Zipcode'), 'zipcode')->hideFromIndex(),
        Hidden::make(__('Housenumber'), 'address_2')->hideFromIndex(),
        Text::make(__('Street'), 'address_1')->hideFromIndex(),
        Text::make(__('City'), 'city')->hideFromIndex(),
        Text::make(__('Province'), 'province')->hideFromIndex(),
        Country::make(__('Country'), 'country')->hideFromIndex(),
        Text::make(__('Latitude'), 'latitude')->hideFromIndex(),
        Text::make(__('Longitude'), 'longitude')->hideFromIndex(),
    ]);
}
```

The field exposes a fluent setter for each address attribute so you can map it to the column names used in your resource: `zipcode()`, `housenumber()`, `street()`, `city()`, `province()`, `country()`, `latitude()` and `longitude()`.

Usage manually
--------------

[](#usage-manually)

We have provided an example of how you can use this functionality in your own application. We've currently only used this in the Nova setting, so if you're missing anything, please let us know!

```
use Marshmallow\Zipcode\Facades\Zipcode;

return Zipcode::get(
    $request->zipcode,
    $request->housenumber
);
```

You can map the returned address fields to your own keys by chaining the setter methods before calling `get()`:

```
use Marshmallow\Zipcode\Facades\Zipcode;

return Zipcode::street('address_1')
    ->city('city')
    ->province('province')
    ->country('country')
    ->latitude('latitude')
    ->longitude('longitude')
    ->get($request->zipcode, $request->housenumber);
```

Testing
-------

[](#testing)

```
composer test
```

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

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

Credits
-------

[](#credits)

- [All Contributors](https://github.com/marshmallow-packages/address-prefiller/contributors)

License
-------

[](#license)

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

###  Health Score

47

—

FairBetter than 93% of packages

Maintenance90

Actively maintained with recent releases

Popularity21

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 57.1% 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 ~184 days

Recently: every ~383 days

Total

10

Last Release

101d ago

Major Versions

v1.0.3 → v2.0.02021-12-15

### Community

Maintainers

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

---

Top Contributors

[![stefvanesch](https://avatars.githubusercontent.com/u/46725619?v=4)](https://github.com/stefvanesch "stefvanesch (68 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (49 commits)")[![LTKort](https://avatars.githubusercontent.com/u/2412670?v=4)](https://github.com/LTKort "LTKort (2 commits)")

---

Tags

laraveladdresszipcodepostcodegeodatageodata.nationaalgeoregister.nllocatieservernationaalgeoregister

### Embed Badge

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

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

###  Alternatives

[pragmarx/zipcode

A worldwide address-by-zipcode searcher.

10265.8k](/packages/pragmarx-zipcode)[tapp/filament-google-autocomplete-field

Filament plugin that provides a Google Autocomplete field

30136.4k](/packages/tapp-filament-google-autocomplete-field)[yieldstudio/nova-google-autocomplete

A Laravel Nova Google autocomplete field.

12239.3k](/packages/yieldstudio-nova-google-autocomplete)

PHPackages © 2026

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