propt8 / country-information
PHP library for country information
0.1
2019-09-21 17:09 UTC
Requires
- php: >=7.1
This package is auto-updated.
Last update: 2024-11-22 04:06:35 UTC
README
Country Information
Installation
Package is available on Packagist, you can install it using Composer.
composer require propt8/country-information
Dependencies
- PHP 7.1+
Basic usage
use propt8\Country\Country; Country::countryName('Lithuania'); // return CountryInformationEntity Country::countryCode('LT'); // return CountryInformationEntity Country::countryAlpha3Code('LTU'); // return CountryInformationEntity Country::countryCode('LT')->toArray();
Data sample:
{
"country_name": "Lithuania",
"country_code": "LT",
"country_alpha3_code": "LTU",
"country_numeric_code": 440,
"capital": "Vilnius",
"country_demonym": "Lithuanians",
"total_area": 65300,
"population": 2876475,
"idd_code": "370",
"currency_code": "LTL",
"currency_name": "Lithuanian Litas",
"currency_symbol": "Lt",
"lang_code": "LT",
"lang_name": "Lithuanian",
"cctld": "lt"
}