Download the PHP package koenschipper/laravel-address-parser without Composer
On this page you can find all versions of the php package koenschipper/laravel-address-parser. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download koenschipper/laravel-address-parser
More information about koenschipper/laravel-address-parser
Files in koenschipper/laravel-address-parser
Package laravel-address-parser
Short Description Laravel address parser to parse dutch addresses.
License MIT
Homepage https://github.com/koenschipper/laravel-address-parser
Informations about the package laravel-address-parser
Laravel Dutch Address Parser
A robust and simple Laravel package for parsing Dutch address data. This parser separates street names, house numbers, additions, postcodes, and cities from a single text string, even with complex formats.
Features
- Robust parsing: Supports complex house number additions (e.g.,
12 bis,12-a,12 rood,1/2). - Smart recognition: Works even without spaces between street and house number (e.g.,
Kerkstraat12). - Postcodes & Cities: Recognizes and separates Dutch postcodes (
1234 AB) and cities. - Special Addresses: Also supports
Postbus(PO Box) andAntwoordnummerformats. - Laravel Optimized: Includes Facade, Helper, Validation Rule, and Artisan Command.
- Address DTO: Returns a structured
Addressobject that isArrayableandJsonSerializable.
Installation
You can install the package via composer:
You can publish the config file with (optional):
Usage
You can use the parser via the Facade, the helper function, or the Artisan command.
Usage via Facade
The LaravelAddressParser::parse() method returns an Address object.
Usage via Helper
For quick access, you can use the helper function:
Street and Number Only (Array)
If you only want the street and the house number as a simple array:
Validation in Laravel
You can use the included validation rule in your Request classes or controllers:
Artisan Command
Test addresses directly from your terminal:
Address Object Properties
The Address object has the following properties:
street: The street name.houseNumber: Only the numerical part of the house number.houseNumberAddition: The addition (e.g., 'bis' or 'a').fullHouseNumber: House number including addition.postcode: Formatted postcode (1234 AB).city: The city or place of residence.
The object can also be converted to an array or JSON (with snake_case keys):
Testing
Need a Laravel Developer?
If you're looking for a dedicated Laravel developer to help you with your project, feel free to reach out via my website: koenschipper.com.
Changelog
Please see CHANGELOG for more information on what has changed recently.
Credits
- Koen Schipper
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-address-parser with dependencies
spatie/laravel-package-tools Version ^1.16
illuminate/contracts Version ^11.0||^12.0