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.
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 |
Install the package quickly via Composer:
composer require lwwcas/laravel-countries
And get started with Artisan
php artisan w-countries:install
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();
composer test
The MIT License (MIT). Please see License File for more information.