PHPackages                             speelpenning/laravel-postcode-nl - 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. [Validation &amp; Sanitization](/categories/validation)
4. /
5. speelpenning/laravel-postcode-nl

ActiveLibrary[Validation &amp; Sanitization](/categories/validation)

speelpenning/laravel-postcode-nl
================================

A Laravel client using the Postcode.eu REST API for Dutch address verification.

v10.1(2mo ago)1221.6k—9.6%34MITPHPPHP ^8.2CI passing

Since Aug 14Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/Speelpenning-nl/laravel-postcode-nl)[ Packagist](https://packagist.org/packages/speelpenning/laravel-postcode-nl)[ RSS](/packages/speelpenning-laravel-postcode-nl/feed)WikiDiscussions 10.x Synced yesterday

READMEChangelog (4)Dependencies (18)Versions (34)Used By (0)

Postcode.eu client for Laravel 12 &amp; 13
==========================================

[](#postcodeeu-client-for-laravel-12--13)

[![Build Status](https://github.com/Speelpenning-nl/laravel-postcode-nl/actions/workflows/tests.yml/badge.svg)](https://github.com/Speelpenning-nl/laravel-postcode-nl/actions/workflows/tests.yml/badge.svg)[![Latest stable Version](https://camo.githubusercontent.com/d3800db3a9c8c2e76f6f166be5d5318bc520df68417c67ee4df365580b1c28b2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f737065656c70656e6e696e672f6c61726176656c2d706f7374636f64652d6e6c)](https://camo.githubusercontent.com/d3800db3a9c8c2e76f6f166be5d5318bc520df68417c67ee4df365580b1c28b2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f737065656c70656e6e696e672f6c61726176656c2d706f7374636f64652d6e6c)[![License](https://camo.githubusercontent.com/9494e947a1392a9c82453365bb6f80f6fe842572aaa87720d8b758f4e0e2df21/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f737065656c70656e6e696e672f6c61726176656c2d706f7374636f64652d6e6c)](https://camo.githubusercontent.com/9494e947a1392a9c82453365bb6f80f6fe842572aaa87720d8b758f4e0e2df21/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f737065656c70656e6e696e672f6c61726176656c2d706f7374636f64652d6e6c)

A client using the Postcode.eu REST API for Dutch address verification.

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

[](#installation)

Pull the package in through Composer:

```
composer require speelpenning/laravel-postcode-nl
```

Next, register an account with Postcode.eu to obtain a key and secret, required to authenticate with the API. See [https://account.postcode.eu/register/api/en\_GB](https://account.postcode.eu/register/api/en_GB) for more information. Once you have a key and secret, store them in your .env file.

Add the following service provider to your application config:

```
Speelpenning\PostcodeNl\PostcodeNlServiceProvider::class,
```

Walk through the configuration section to make things work.

Usage
-----

[](#usage)

There are two ways to use the address lookup: by injecting the address lookup service in your code or using the AddressController that is shipped with the package.

### Dependency injection

[](#dependency-injection)

Example:

```
