Laravel Cloud is here! Zero-config managed infrastructure for Laravel apps. Deploy now.

Country List

monarobase/country-list image

Country List stats

Downloads
1.4M
Stars
228
Open Issues
3
Forks
38

View on GitHub →

List of all countries with names and ISO 3166-1 codes in all languages and data formats for Laravel

Country List

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');
});

Monarobase Country List Related Articles

Use the New Fluent Helper to Work With Multi-dimensional Arrays in Laravel 11.2 image

Use the New Fluent Helper to Work With Multi-dimensional Arrays in Laravel 11.2

Read article
LangCountry is a Localization Package for Laravel image

LangCountry is a Localization Package for Laravel

Read article
Writing and debugging Eloquent queries with Tinkerwell image

Writing and debugging Eloquent queries with Tinkerwell

Read article
Lemon Squeezy for Laravel image

Lemon Squeezy for Laravel

Read article
Laravel Security 101: Never trust your users image

Laravel Security 101: Never trust your users

Read article
Provide Country and Other Locale Data in Laravel image

Provide Country and Other Locale Data in Laravel

Read article
Laravel Cloud logo

Laravel Cloud

Easily create and manage your servers and deploy your Laravel applications in seconds.

Laravel Cloud
Kirschbaum logo

Kirschbaum

Providing innovation and stability to ensure your web application succeeds.

Kirschbaum
SaaSykit: Laravel SaaS Starter Kit logo

SaaSykit: Laravel SaaS Starter Kit

SaaSykit is a Multi-tenant Laravel SaaS Starter Kit that comes with all features required to run a modern SaaS. Payments, Beautiful Checkout, Admin Panel, User dashboard, Auth, Ready Components, Stats, Blog, Docs and more.

SaaSykit: Laravel SaaS Starter Kit
Shift logo

Shift

Running an old Laravel version? Instant, automated Laravel upgrades and code modernization to keep your applications fresh.

Shift
PhpStorm logo

PhpStorm

The go-to PHP IDE with extensive out-of-the-box support for Laravel and its ecosystem.

PhpStorm
Acquaint Softtech logo

Acquaint Softtech

Acquaint Softtech offers AI-ready Laravel developers who onboard in 48 hours at $3000/Month with no lengthy sales process and a 100 percent money-back guarantee.

Acquaint Softtech