itsonlyjeff / dutch-helpers
一套工具,用于在Laravel中更轻松地处理荷兰联系信息。
0.1
2023-12-03 22:16 UTC
Requires
- php: ^8.2
- illuminate/http: ^10.34
- illuminate/support: ^10.34
This package is auto-updated.
Last update: 2024-09-03 23:46:37 UTC
README
此Laravel包附带一个工具箱,可用于通过邮编和门牌号搜索荷兰地址。此外,它扩展了验证规则,包括荷兰电话号码和邮编验证。
功能
- 荷兰电话号码验证
- 荷兰邮政编码验证
- 通过邮编和门牌号查找地址
安装
通过Composer
$ composer require itsonlyjeff/dutch-helpers:^0.1
基本用法
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...
响应
{ 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: [] }
贡献
贡献使开源社区成为一个如此神奇的学习、灵感和创造的地方。您所做的一切贡献都备受赞赏。
如果您有改进这个项目的建议,请克隆仓库并创建一个pull request。您也可以简单地打开一个带有“enhancement”标签的问题。别忘了给项目加星!再次感谢!
- 克隆项目
- 创建您的功能分支(
git checkout -b feature/AmazingFeature
) - 提交您的更改(
git commit -m 'Add some AmazingFeature'
) - 将分支推送到远程(
git push origin feature/AmazingFeature
) - 打开一个Pull Request
许可证
MIT许可证(MIT)。请参阅许可证文件获取更多信息。