vanthao03596/laravel-hanhchinhvn
hành chính việt nam laravel
6,574
39
| Install | |
|---|---|
composer require vanthao03596/laravel-hanhchinhvn |
|
| Latest Version: | 1.2.0 |
| PHP: | ^7.3 || ^8.0 |
| Laravel: | 6 · 7 · 8 |
| License: | MIT |
| Last Updated: | Mar 4, 2022 |
| Links: | GitHub · Packagist |
Maintainer: vanthao03596
Phân cấp hành chính Việt Nam cho Laravel
Laravel hcvn contain all cities, districts, wards in vietnam
(Chú ý: Huyện Lý Sơn tỉnh Quảng Ngãi hiện chỉ còn cấp Huyện không có cấp xã )
Installation
You can install the package via composer:
composer require vanthao03596/laravel-hanhchinhvn
Usage
php artisan vendor:publish --provider="Vanthao03596\HCVN\HCVNServiceProvider"
php artisan migrate
php artisan hcvn:install
Working with Models
Get all cities, districts, wards
use Vanthao03596\HCVN\Models\Province;
use Vanthao03596\HCVN\Models\District;
use Vanthao03596\HCVN\Models\Ward;
$cities = Province::get();
$districts = District::get();
$wards = Ward::get();
Get data via relationship
use Vanthao03596\HCVN\Models\Province;
$city = Province::first();
$districts = $city->districts;
$wards = $city->wards;
All data get from: madnh/hanhchinhvn
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Credits
License
The MIT License (MIT). Please see License File for more information.
Related Packages
doctrine/dbal
Powerful PHP database abstraction layer (DBAL) with many features for database s...
641,106,524
9,700
laravel/serializable-closure
Laravel Serializable Closure provides an easy and secure way to serialize closur...
418,291,778
609
Version History
| Version | Released | PHP | Laravel | License |
|---|---|---|---|---|
| 1.2.0 | ^7.3 | | ^6.0| | MIT | |
| 1.1.9 | ^7.3 | | ^6.0| | MIT | |
| 1.1.8 | ^7.3 | | ^6.0| | MIT | |
| 1.1.7 | ^7.2.5| | MIT | ||
| 1.1.6 | ^7.2| | MIT | ||
| 1.1.5 | ^7.2| | MIT | ||
| 1.1.4 | ^7.2| | MIT | ||
| 1.1.3 | ^7.2| | MIT | ||
| 1.1.2 | ^7.2| | MIT | ||
| 1.1.1 | ^7.2 | MIT | ||
| 1.1.0 | ^7.2 | MIT | ||
| 1.0 | ^7.2 | MIT |