List of all countries with names and ISO 3166-1 codes in all languages and data formats for Laravel
monarobase/country-list is a Laravel package for list of all countries with names and iso 3166-1 codes in all languages and data formats for laravel.
It currently has 270 GitHub stars and 2.913.267 downloads on Packagist (latest version 3.7.0).
Install it with composer require monarobase/country-list.
Discover more Laravel packages by monarobase
or browse all Laravel packages to compare alternatives.
Last updated
Country List is a package for Laravel which lists all countries with names and ISO 3166-1 codes in all languages and data formats.
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,
Get all countries
Route::get('/', function()
{
return Countries::getList('en', 'json');
});
Get one country
Route::get('/', function()
{
return Countries::getOne('RU', 'en');
});