devfaysal / laravel-bangladesh-geocode
Installs: 4 350
Dependents: 0
Suggesters: 0
Security: 0
Stars: 63
Watchers: 3
Forks: 24
Open Issues: 1
Requires
- php: ^7.3|^8.0
- illuminate/support: ^8.0|^9.0|^10.0|^11.0
Requires (Dev)
- orchestra/testbench: ^6.0|^7.0|^8.0|^9.0
- phpunit/phpunit: ^9.0|^10.5
README
Division, District, Upazila and Union data of Bangladesh for Laravel application. One artisan command and you are all set.
Do not hesitate to share your thought, create issue or send pull request.
Laravel Version Compatibility
Update (New Upazila and Union added in v2.3.0)
Run this command to add new records to existing application safely
php artisan BangladeshGeocode:addnew
Installation
You can install the package via composer:
composer require devfaysal/laravel-bangladesh-geocode
Setup everything with just running one artisan command
php artisan BangladeshGeocode:setup
Usage
use Devfaysal\BangladeshGeocode\Models\Division; use Devfaysal\BangladeshGeocode\Models\District; use Devfaysal\BangladeshGeocode\Models\Upazila; $divisions = Division::all(); $districts = District::all(); $upazilas = Upazila::all(); $division = Division::where('name', 'Dhaka'); $allDistrictsOfDhaka = $division->districts; $division = Division::find(1); $districts = $division->districts; $district = District::find(1); $upazilas = $district->upazilas; //Use any Laravel (eluquent) model functions...
Testing
The package is well supported by automated test.
composer test
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email devfaysal@gmail.com instead of using the issue tracker.
Credits
- Faysal Ahamed
- All Contributors
- Special Thanks to Nuhil Mehdy. All of the Division, District and Upazila data of this package is from his repo.
License
The MIT License (MIT). Please see License File for more information.