lwwcas / laravel-countries by lwwcas

A comprehensive package for managing country data in Laravel applications, including multilingual support, geographic coordinates, and detailed metadata for seamless integration with Laravel.
52,765
112
5
Package Data
Maintainer Username: lwwcas
Maintainer Contact: lwwcas@gmail.com (Lucas Duarte O. Monteiro)
Package Create Date: 2020-11-17
Package Last Update: 2025-03-30
Home Page: https://lwwcas.github.io/laravel-countries/
Language: PHP
License: MIT
Last Refreshed: 2026-01-06 15:00:02
Package Statistics
Total Downloads: 52,765
Monthly Downloads: 3,036
Daily Downloads: 227
Total Stars: 112
Total Watchers: 5
Total Forks: 31
Total Open Issues: 12

Full Documentation

Very short description

Laravel Countries is a package that provides everything you need to kickstart a new project with comprehensive country information, including translations. Optimized for Laravel, it ensures efficient access and management of country data.

The package stores all data directly in your database, allowing you to easily link it to any other table in a simple and familiar way using Laravelโ€™s Eloquent ORM.

๐ŸŒ Available Languages

We currently support the following languages:

| Language | Flag | Country | Number of Countries | |---------------|------|--------------|---------------------| | Arabic | ๐Ÿ‡ธ๐Ÿ‡ฆ | Saudi Arabia | 25 | | Dutch | ๐Ÿ‡ณ๐Ÿ‡ฑ | Netherlands | 3 | | English | ๐Ÿ‡ฌ๐Ÿ‡ง | United Kingdom| 67 | | German | ๐Ÿ‡ฉ๐Ÿ‡ช | Germany | 6 | | Italian | ๐Ÿ‡ฎ๐Ÿ‡น | Italy | 4 | | Portuguese | ๐Ÿ‡ง๐Ÿ‡ท | Brazil | 9 | | Russian | ๐Ÿ‡ท๐Ÿ‡บ | Russia | 4 | | Spanish | ๐Ÿ‡ช๐Ÿ‡ธ | Spain | 21 |

๐Ÿš€ Getting Started

Install the package quickly via Composer:

composer require lwwcas/laravel-countries

And get started with Artisan

php artisan w-countries:install

Usage

You can access all the information in the database with a simple query

use  Lwwcas\LaravelCountries\Models\Country;

Country::whereIso('BR')->first();
Country::whereIsoAlpha3('BRA')->first();
Country::whereSlug('brasil')->first();

Testing With Pest Php

composer test

Credits

License

The MIT License (MIT). Please see License File for more information.