PHPackages                             pimoudeveldhuis/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. [API Development](/categories/api)
4. /
5. pimoudeveldhuis/laravel-postcode-nl

ActiveLibrary[API Development](/categories/api)

pimoudeveldhuis/laravel-postcode-nl
===================================

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

10.0.1(2y ago)0311MITPHPPHP ^8.1

Since Apr 28Pushed 2y agoCompare

[ Source](https://github.com/pimoudeveldhuis/laravel-postcode-nl)[ Packagist](https://packagist.org/packages/pimoudeveldhuis/laravel-postcode-nl)[ RSS](/packages/pimoudeveldhuis-laravel-postcode-nl/feed)WikiDiscussions 10.x Synced 1mo ago

READMEChangelog (1)Dependencies (9)Versions (3)Used By (0)

Postcode.nl client for Laravel 8
================================

[](#postcodenl-client-for-laravel-8)

[![Build Status](https://camo.githubusercontent.com/3be57a5048651d57be1b4d06a4f129d92d42125a904d6a165462bc31e8fc398f/68747470733a2f2f7472617669732d63692e6f72672f537065656c70656e6e696e672d6e6c2f6c61726176656c2d706f7374636f64652d6e6c2e737667)](https://travis-ci.org/Speelpenning-nl/laravel-postcode-nl)[![License](https://camo.githubusercontent.com/b58b711dac7bbf1f22e96827fb0951a362b2b5a078e51c17041efb51024b7caa/68747470733a2f2f706f7365722e707567782e6f72672f737065656c70656e6e696e672f6c61726176656c2d706f7374636f64652d6e6c2f6c6963656e7365)](https://packagist.org/packages/speelpenning/laravel-postcode-nl)

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

All the work for this package has been done by Gerben Speelpenning, I merely updated to composer.json to make it work with Laravel 10 and submitted it to Packagist for easy installation, but if there is anything that does not work either because of the Laravel update or updates to the PostcodeNL API please let me know so I can fix them!

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

[](#installation)

Pull the package in through Composer:

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

Next, register an account with Postcode.nl to obtain a key and secret. See  for further 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:

```
