/laravel-bangladesh-geocode

Division, District and Upazila data of Bangladesh for Laravel application (5.5 and above)

Primary LanguagePHPMIT LicenseMIT

Bangladesh Geocode

Division, District and Upazila data of Bangladesh for Laravel application. Migration and seeders are ready. Just publish migrations and seeders and then migrate the db and run the seed command.

Do not hesitate to share your thought, create issue or send pull request.

Latest Version on Packagist Quality Score Total Downloads

Laravel Version Compatibility

Laravel Package
5.5.x 0.4.x
5.6.x 0.4.x
5.7.x 0.4.x
5.8.x 0.4.x
6.x.x 0.4.x
7.x.x 0.4.x
8.x.x 1.0.x

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::find(1);
$districts = $division->districts;

$district = District::find(1);
$upazilas = $district->upazilas;

//Use any Laravel model functions...

Testing

composer test

Changelog

Please see CHANGELOG for more information what has changed recently.

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

License

The MIT License (MIT). Please see License File for more information.