承接 lemonpatwari/bangladeshgeocode 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

lemonpatwari/bangladeshgeocode

最新稳定版本:v3.1

Composer 安装命令:

composer require lemonpatwari/bangladeshgeocode

包简介

A Laravel package for Bangladesh geolocation with divisions, districts, upazilas, and unions.

README 文档

README

Division, District, Upazila/Thana and Union 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.

Total Downloads Packagist License Latest Stable Version GitHub stars GitHub forks

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 0.5.x
12.x.x 3.0.0.x

Installation

You can install the package via composer:

composer require lemonpatwari/bangladeshgeocode

Laravel uses Package Auto-Discovery, so doesn't require you to manually add the ServiceProvider.

Laravel without auto-discovery:

php artisan vendor:publish --provider="lemonpatwari\bangladeshgeocode\BangladeshGeocodeServiceProvider"

#If you need to overrride previously published migrationa and seeders
php artisan vendor:publish --provider="lemonpatwari\bangladeshgeocode\BangladeshGeocodeServiceProvider" --force

Publish Migration and seeders

You can publish migration and seeders via single command:

php artisan geolocation:install

You can publish migration and seeders via different command:

php artisan migrate

composer dump-autoload

php artisan db:seed --class=DivisionSeeder
php artisan db:seed --class=DistrictSeeder
php artisan db:seed --class=ThanaSeeder
php artisan db:seed --class=UnionSeeder

Usage

use lemonpatwari\bangladeshgeocode\Models\Division;
use lemonpatwari\bangladeshgeocode\Models\District;
use lemonpatwari\bangladeshgeocode\Models\Thana;
use lemonpatwari\bangladeshgeocode\Models\Union;

$divisions = Division::all();
$districts = District::all();
$thanas = Thana::all();
$union = Union::all();

$divisions = Division::with('districts')->get(); // districts hasMany
$districts = District::with('division','thanas')->get(); //division belongsTo and thanas hasMany
$thanas = Thana::with('district','unions')->get(); //district belongsTo and unions hasMany;
$union = Union::all();

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

//Use any Laravel model functions...

Security

If you discover any issues, please email lemonpatwari@gmail.com / hello@lemonpatwari.com instead of using the issue tracker.

Credits

License

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

统计信息

  • 总下载量: 522
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 11
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 11
  • Watchers: 1
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-09-06