https://github.com/lwwcas/laravel-countries
A comprehensive package for managing country data in Laravel applications, including multilingual support, geographic coordinates, and detailed metadata for seamless integration with Laravel.
https://github.com/lwwcas/laravel-countries
arabic countries country country-codes country-flags database dutch english german italian laravel migrations php portuguese portuguese-brazilian portuguese-portugal regions russian seeds spanish
Last synced: 2 months ago
JSON representation
A comprehensive package for managing country data in Laravel applications, including multilingual support, geographic coordinates, and detailed metadata for seamless integration with Laravel.
- Host: GitHub
- URL: https://github.com/lwwcas/laravel-countries
- Owner: lwwcas
- License: mit
- Created: 2020-11-17T16:00:52.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2025-03-30T18:20:51.000Z (6 months ago)
- Last Synced: 2025-05-27T22:46:53.284Z (4 months ago)
- Topics: arabic, countries, country, country-codes, country-flags, database, dutch, english, german, italian, laravel, migrations, php, portuguese, portuguese-brazilian, portuguese-portugal, regions, russian, seeds, spanish
- Language: PHP
- Homepage: https://lwwcas.github.io/laravel-countries/
- Size: 8.14 MB
- Stars: 99
- Watchers: 5
- Forks: 28
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
Awesome Lists containing this project
README
![]()
### [Full Documentation](https://lwwcas.github.io/laravel-countries/)
## 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:
```sh
composer require lwwcas/laravel-countries
```And get started with Artisan
```sh
php artisan w-countries:install
```## Usage
You can access all the information in the database with a simple query
``` php
use Lwwcas\LaravelCountries\Models\Country;Country::whereIso('BR')->first();
Country::whereIsoAlpha3('BRA')->first();
Country::whereSlug('brasil')->first();
```### Testing With Pest Php
``` bash
composer test
```## Credits
- [Lucas Duarte](https://github.com/lwwcas)
- [All Contributors](../../contributors)## License
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.