bhuvidya/laravel-countries 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

bhuvidya/laravel-countries

最新稳定版本:v12.0

Composer 安装命令:

composer require bhuvidya/laravel-countries

包简介

Laravel Countries is a bundle for Laravel, providing Almost ISO 3166_2, 3166_3, currency, Capital and more for all countries. Bug kudos to Christoph Kempen, on whose work this package is heavily based (webpatser/laravel-countries).

README 文档

README

License Total Downloads Latest Stable Version Latest Unstable Version

Note I have now switched the semver versioning for my Laravel packages to "match" the latest supported Laravel version.

Laravel Countries is a bundle for Laravel, providing ISO 3166_2, 3166_3, currency, capitals and more for all countries.

Big kudos to Christoph Kempen, on whose work this package is heavily based (https://github.com/webpatser/laravel-countries). I ended up doing so many little changes that I thought it best to start my own package. And this is the first package I have put together and added to Packagist etc, so I was keen to learn the whole process!

Please note that this package was tested on Laravel 5.5 - I cannot guarantee it will work on earlier versions. Sorry.

Installation

Add bhuvidya/laravel-countries to your app:

$ composer require "bhuvidya/laravel-countries"

If you're using Laravel 5.5, you don't have to edit app/config/app.php.

Otherwise, edit app/config/app.php and add the service provider:

'providers' => [
    'Bhuvidya\Countries\CountriesServiceProvider',
]

Configuration

You can elect to manage your own configuration. This is an optional step, it only contains the table name and does not need to be altered. If the default table name countries suits you, leave it. Otherwise run the following command

$ php artisan vendor:publish --provider='Bhuvidya\Countries\CountriesServiceProvider' --tag=config

The config file can then be found at config/countries.php.

Migrations

The service provider automatically adds the package's migrations to your app.

Seeding

There is a seeding module in the package. You can either run the seeder manually from the command line:

$ php artisan db:seed --class='Bhuvidya\Countries\CountriesSeeder'

Otherwise you can add it to one of your app's database seeder files, probably database/seeds/DatabaseSeeder.php:

use Bhuvidya\Countries\CountriesSeeder;

/**  
 * Run the database seeds.
 *    
 * @return void 
 */ 
public function run()
{        
    ...
    $this->call(CountriesSeeder::class);
    ...
}

统计信息

  • 总下载量: 28.21k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 31
  • 点击次数: 3
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 31
  • Watchers: 2
  • Forks: 8
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 未知

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固