parziphal/world-data

国家、语言名称和代码。

v0.2 2016-09-26 15:42 UTC

This package is not auto-updated.

Last update: 2024-09-26 01:00:07 UTC


README

国家和语言列表(英文)。国家对应ISO 2、ISO 3和ISO数字代码;语言对应ISO 639-1代码。

Parziphal\WorldData命名空间下有两个类:LanguagesCountries。可以使用这些类获取每个资源的数据,并可选择自定义。

use Parziphal\WorldData\Countries;

// Get all data columns
$countries = Countries::get();

// Get only country names
$countries = Countries::get(['name']);

// Get both "names" and "iso_code_2" columns, and change "iso_code_2" column name to just "iso"
$countries = Countries::get(['name', 'iso_code_2' => 'iso']);

致谢

许可证

MIT