Download the PHP package sandofvega/bdgeocode without Composer
On this page you can find all versions of the php package sandofvega/bdgeocode. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download sandofvega/bdgeocode
More information about sandofvega/bdgeocode
Files in sandofvega/bdgeocode
Package bdgeocode
Short Description 8 Division, 64 District, 491 Thana and 2350 Union fully mapped laravel package.
License MIT
Informations about the package bdgeocode
Laravel Bangladesh Geocode
8 Division, 64 District, 491 Thana and 4541 Union fully mapped laravel package. Easy to install & config. All data is accessible from database using laravel eloquent ORM.
All information, content, and spelling have been taken from https://bangladesh.gov.bd
Contents
- Installation
- Configuration
- Usage
- License
- Contribution guidelines
Installation
In order to install Bdgeocode, just run this command in your project:
Configuration
1) Publish models and migration file:
2) Run artisan migrate command:
After the migration, four new tables will be present:
divisions
districts
thanas
unions
3) Add Bdgeocode's seeder class to database/seeds/DatabaseSeeder.php
:
Now you are ready. When you run the seed command (e.g. db:seed
or migrate:fresh --seed
) the Bdgeocode's data will be inserted into your database.
Usage
You can get all data by using those models. E.g:
There are relations bitween models. E. g:
- Note: There is one division for a district so the relation name is
division
(singular), notdivisions
. And there are many thanas in a district so the relation name isthanas
(plural), notthana
. You must follow this rule to call every relation.
License
Laravel Bangladesh Geocode is free software distributed under the terms of the MIT license.
Contribution guidelines
We follow PSR-2 and PSR-4 PHP coding standards and Semantic Versioning.
Please report any issue you find. And pull requests are welcome.