webpatser / laravel-countries
Modern Laravel Countries package providing ISO 3166-2, ISO 3166-3, currency, capital and more for all countries. Compatible with Laravel 11.x, 12.x, and 13.x.
v2.1.1
2026-04-05 09:33 UTC
Requires
- php: ^8.2
- illuminate/database: ^11.0|^12.0|^13.0
- illuminate/support: ^11.0|^12.0|^13.0
Requires (Dev)
- orchestra/testbench: ^10.0|^11.0
- pestphp/pest: ^4.0
- pestphp/pest-plugin-laravel: ^4.0
README
A comprehensive Laravel package for handling countries data with all 249 countries, flags, currencies, regions, and more.
Installation
Install via Composer:
composer require webpatser/laravel-countries
Run the installation command to set up the database:
php artisan countries:install
Quick Usage
use Webpatser\Countries\Countries; $countries = new Countries(); $usa = $countries->getOne('US'); $allCountries = $countries->getList(); $euroCountries = $countries->getByCurrency('EUR');
Features
- 🌍 All 249 countries with complete data
- 🏳️ Flag emojis for every country
- 💰 Currency information and filtering
- 🌏 Regional grouping and filtering
- 🔍 Search and query capabilities
- 📋 Laravel validation rules
- 🎨 Collection and String macros
- 🗄️ Eloquent model support
Documentation
For complete documentation, examples, and API reference, visit:
https://documentation.downsized.nl/laravel-countries
License
MIT License