承接 anuzpandey/laravel-nepal-geo 相关项目开发

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

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

anuzpandey/laravel-nepal-geo

最新稳定版本:1.3.0

Composer 安装命令:

composer require anuzpandey/laravel-nepal-geo

包简介

A Laravel Package for Nepal's Province, Districts and City Data.

README 文档

README

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

This package provides a Laravel Migration and Seeder Files for Province, Districts and City of the country Nepal.

Installation

You can install the package via composer:

composer require anuzpandey/laravel-nepal-geo

You can publish and run the migrations with:

php artisan vendor:publish --tag="nepal-geo-migrations"
php artisan migrate

You can publish the config file with:

php artisan vendor:publish --tag="nepal-geo-config"

This is the contents of the published config file:

return [
];

Usage

After running the migrations, you can use the following seeder classes to seed the data.

use AnuzPandey\LaravelNepalGeo\Database\Seeders\NepalGeoSeeder;

class DatabaseSeeder extends Seeder
{
    public function run(): void
    {
        $this->call([
            // This will seed the data for Nepal's Province, Districts and City
            NepalGeoSeeder::class, 
        ]);
    }
}

Or you can include individual seeder classes to seed the data.

use AnuzPandey\LaravelNepalGeo\Database\Seeders\DistrictSeeder;
use AnuzPandey\LaravelNepalGeo\Database\Seeders\CitySeeder;
use AnuzPandey\LaravelNepalGeo\Database\Seeders\StateSeeder;

class DatabaseSeeder extends Seeder
{
    public function run(): void
    {
        $this->call([
            StateSeeder::class,
            DistrictSeeder::class,
            CitySeeder::class,
        ]);
    }
}

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

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

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-06-23