laravel-countries

Laravel country database package with Eloquent models, ISO 3166 codes, country flags, GeoJSON maps, phone codes, currencies and translations in 9 languages. Bui

What is laravel-countries?

Laravel country database package with Eloquent models, ISO 3166 codes, country flags, GeoJSON maps, phone codes, currencies and translations in 9 languages. Built with migrations & seeders for Laravel 10–13.

Overview of laravel-countries

What it is

Laravel Countries is an Eloquent-first package for Laravel that provides a complete country database. It models countries as native Eloquent models with ISO 3166 codes, international phone codes, currencies, flags (SVG, emoji, HEX/RGB colors), GeoJSON borders, geographic coordinates, demographics, GDP, independence dates, and region hierarchies. All data is seeded into your own database and translated into 9 languages. No external APIs are required.

Key features

  • Eloquent-native country model with scopes, relationships, and eager loading
  • ISO 3166 codes (Alpha-2, Alpha-3, numeric) queryable via whereIso, whereIsoAlpha3, whereIsoNumeric
  • International phone codes and currency data
  • Flags in three formats: SVG markup, emoji, and HEX/RGB colors
  • GeoJSON borders and coordinates for mapping
  • Translations in 9 languages: Arabic, Dutch, English, German, Italian, Portuguese, Russian, Spanish, Turkish
  • One Artisan command to install and seed everything, idempotent and CI-safe

Use cases

  • Country selection dropdowns with localized names
  • Geographic mapping using GeoJSON borders
  • Phone number validation by country code
  • Currency display and conversion references
  • Multi-language country and region names for international applications
  • Demographic and economic data for analytics or reports

Getting started

composer require lwwcas/laravel-countries
php artisan w-countries:install

For production or CI environments, use the --force flag:

php artisan w-countries:install --force

To seed only specific languages:

php artisan w-countries:seed --languages=en,pt

License and pricing

This package is open source and licensed under the MIT license. It is free to use.

Based on the project's public README and repository metadata.

Add this badge to your README

Featured on YunoDB Badge styles & help

Maintain this project? Show that it is featured on YunoDB.

Markdown[![Featured on YunoDB](https://yunodb.com/badge/lwwcaslaravel-countries.svg)](https://yunodb.com/tools/lwwcaslaravel-countries?utm_source=github&utm_medium=badge)
HTML<a href="https://yunodb.com/tools/lwwcaslaravel-countries?utm_source=github&utm_medium=badge"><img src="https://yunodb.com/badge/lwwcaslaravel-countries.svg" alt="Featured on YunoDB" height="20"></a>