LaravelPackages.net
Acme Inc.
Toggle sidebar
deniztezcan/laravel-postcodenl-api

Laravel PostcodeNL API package

479
1
0.2.3
About deniztezcan/laravel-postcodenl-api

deniztezcan/laravel-postcodenl-api is a Laravel package for laravel postcodenl api package. It currently has 1 GitHub stars and 479 downloads on Packagist (latest version 0.2.3). Install it with composer require deniztezcan/laravel-postcodenl-api. Discover more Laravel packages by deniztezcan or browse all Laravel packages to compare alternatives.

Last updated

Laravel PostcodeNL API package

Latest Stable Version Total Downloads Latest Unstable Version License StyleCI

Intergrates the PostcodeNL API with Laravel 5 & 6 via a ServiceProvider and Facade. This package currently supports only the validation of dutch addresses.

Instalation

composer require deniztezcan/laravel-postcodenl-api

Add a ServiceProvider to your providers array in config/app.php:

    'providers' => [
    	//other things here

    	DenizTezcan\LaravelPostcodeNLAPI\PostcodeNLAPIServiceProvider::class,
    ];

Add the facade to the facades array:

    'aliases' => [
    	//other things here

    	'PostcodeNLAPI' => DenizTezcan\LaravelPostcodeNLAPI\Facades\PostcodeNLAPI::class,
    ];

Finally, publish the configuration files:

php artisan vendor:publish --provider="DenizTezcan\LaravelPostcodeNLAPI\PostcodeNLAPIServiceProvider"

Configuration

Please set your API: key and secret in the config/postcodenlapi.php

Usage

To get the street and city linked to a Dutch postalcode, housenr and extension. The response is returned in json format, ideal for ajax.

use PostcodeNLAPI;

$data = PostcodeNLAPI::validateDutch('1010AA', '1', 'a');

Star History Chart