itsonlyjeff/dutch-helpers
最新稳定版本:0.2
Composer 安装命令:
composer require itsonlyjeff/dutch-helpers
包简介
A set of tools to make working with Dutch contact details easier in Laravel.
README 文档
README
This Laravel package comes with a toolbox to search for Dutch addresses using zip code and house number. In addition, it extends the validation rules with Dutch telephone number and zip code validation.
Features
- Dutch Phone Number Validation
- Dutch Postal Code Validation
- Find address via Postal Code and House Number
Installation
Via Composer
$ composer require itsonlyjeff/dutch-helpers:^0.2
Basic Usage
RandomController.php
use ItsOnlyJeff\DutchHelpers\Classes\NLPostCodeService; // ... $validator = $request->validate([ 'phone' => ['required', 'dutch-phone-number'], 'zipcode' => ['required', 'dutch-zipcode'], 'house_number' => ['required', 'numeric'], ]); $location_details = new NLPostCodeService($validator['zipcode'], $validator['house_number']); $address = $location_details->adres; $latlon = $location_details->locatie; // etc...
Response
{ bron: "BAG", postcode: "2595BG", huisnummer: "1", woonplaatsnaam: "'s-Gravenhage", gemeentenaam: "'s-Gravenhage", provincienaam: "Zuid-Holland" provincieafkorting: "ZH" straatnaam: "Prinses Irenepad" adres: "Prinses Irenepad" locatie: array:2 [▼ 0 => "4.32599601" 1 => "52.08314722" ] percelen: [] buurtnaam: "Bezuidenhout-West" wijknaam: "Wijk 26 Bezuidenhout" waterschapsnaam: "Hoogheemraadschap van Delfland" gekoppeld_appartement: [] }
Contributing
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
License
The MIT License (MIT). Please see License File for more information.
统计信息
- 总下载量: 38
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-12-03