Laravel Countries

Laravel Countries 是一个 Laravel 捆绑包,为所有国家提供 Almost ISO 3166_2、3166_3、货币、资本等信息。「Laravel Countries is a bundle for Laravel, providing Almost ISO 3166_2, 3166_3, currency, Capital and more for all countries.」

  • 所有者: webpatser/laravel-countries
  • 平台:
  • 许可证: MIT License
  • 分类:
  • 主题:
  • 喜欢:
    0
      比较:

Github星跟踪图

Laravel Countries

Total Downloads
Latest Stable Version
Latest Unstable Version

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

Please note that version 1.4 is Laravel 5 only, older versions of Laravel should use version 1.3.4 instead

Installation

Add webpatser/laravel-countries to composer.json.

"webpatser/laravel-countries": "dev-master"

Run composer update to pull down the latest version of Country List.

Edit app/config/app.php and add the provider and filter

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

Now add the alias.

'aliases' => [
    'Countries' => 'Webpatser\Countries\CountriesFacade',
]

Model

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

$ php artisan vendor:publish

Next generate the migration file:

$ php artisan countries:migration

It will generate the <timestamp>_setup_countries_table.php migration and the CountriesSeeder.php seeder. To make sure the data is seeded insert the following code in the seeds/DatabaseSeeder.php

//Seed the countries
$this->call('CountriesSeeder');
$this->command->info('Seeded the countries!'); 

You may now run it with the artisan migrate command:

$ php artisan migrate --seed

After running this command the filled countries table will be available

主要指标

概览
名称与所有者webpatser/laravel-countries
主编程语言PHP
编程语言PHP (语言数: 2)
平台
许可证MIT License
所有者活动
创建于2013-07-18 13:55:36
推送于2023-09-28 09:40:39
最后一次提交2023-02-08 12:09:34
发布数20
最新版本名称1.5.4 (发布于 2018-05-16 08:38:23)
第一版名称1.0 (发布于 2014-06-27 11:29:59)
用户参与
星数754
关注者数22
派生数226
提交数130
已启用问题?
问题数70
打开的问题数35
拉请求数38
打开的拉请求数15
关闭的拉请求数17
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?