Skip to content
Division, District and Upazila data of Bangladesh for Laravel application (5.5 and above)
PHP
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
config
database
src
tests
.editorconfig
.gitattributes
.gitignore
.scrutinizer.yml
.styleci.yml
.travis.yml
CHANGELOG.md
CONTRIBUTING.md
LICENSE.md
README.md
composer.json
phpunit.xml.dist

README.md

Bangladesh Geocode

Division, District and Upazila data of Bangladesh for Laravel application. Migration and Seeds are ready. Just publish migrations and seeds 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 Build Status Quality Score Total Downloads

Installation

You can install the package via composer:

composer require devfaysal/laravel-bangladesh-geocode

Publish Migration and Seeds

php artisan vendor:publish --provider="Devfaysal\BangladeshGeocode\BangladeshGeocodeServiceProvider"

#If you need to overrride previously published migrationa and seeds
php artisan vendor:publish --provider="Devfaysal\BangladeshGeocode\BangladeshGeocodeServiceProvider" --force

php artisan migrate

composer dump-autoload

php artisan db:seed --class=DivisionSeeder
php artisan db:seed --class=DistrictSeeder
php artisan db:seed --class=UpazilaSeeder

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.

You can’t perform that action at this time.