monarobase/country-list
最新稳定版本:3.6.0
Composer 安装命令:
composer require monarobase/country-list
包简介
List of all countries with names and ISO 3166-1 codes in all languages and data formats for Laravel
关键字:
README 文档
README
Country List is a package for Laravel which lists all countries with names and ISO 3166-1 codes in all languages and data formats.
Installation
Run composer require monarobase/country-list.
Laravel 5.5 uses Package Auto-Discovery, so doesn't require you to manually add the ServiceProvider.
If you don't use auto-discovery, add the ServiceProvider to the providers array in config/app.php
Monarobase\CountryList\CountryListServiceProvider::class,
If needed, add the following alias as well.
'Countries' => Monarobase\CountryList\CountryListFacade::class,
Usage
- Locale (en, en_US, fr, fr_CA...)
- Format (csv, flags.html, html, json, mysql.sql, php, postgresql.sql, sqlite.sql, sqlserver.sql, txt, xml, yaml)
Get all countries
Route::get('/', function() { return Countries::getList('en', 'json'); });
Get one country
Route::get('/', function() { return Countries::getOne('RU', 'en'); });
统计信息
- 总下载量: 2.51M
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 265
- 点击次数: 1
- 依赖项目数: 8
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2013-05-31