Skip to content
List of all countries with names and ISO 3166-1 codes in all languages and data formats
Branch: master
Clone or download
thujohn Merge pull request #20 from simonschaufi/psr-4
Make package PSR-4 compatible and package:discover ready
Latest commit 7d3bee9 Feb 20, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src Make package PSR-4 compatible and package:discover ready Feb 17, 2018
.gitignore
.travis.yml Make package PSR-4 compatible and package:discover ready Feb 17, 2018
README.md Make package PSR-4 compatible and package:discover ready Feb 17, 2018
composer.json Make package PSR-4 compatible and package:discover ready Feb 17, 2018
phpunit.xml Make package PSR-4 compatible and package:discover ready Feb 17, 2018

README.md

Country List

Country List is a package for Laravel 4/5 which lists all countries with names and ISO 3166-1 codes in all languages and data formats.

Installation

Run composer require monarobase/country-list to pull down the latest version of Country List.

Now open up config/app.php and add the service provider to your providers array.

Monarobase\CountryList\CountryListServiceProvider::class,

Now add the alias.

'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');
});
You can’t perform that action at this time.