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.

Home Page:https://lwwcas.github.io/laravel-countries/

Repository from Github https://github.comlwwcas/laravel-countriesRepository from Github https://github.comlwwcas/laravel-countries

Hero Map

release size Packagist Downloads Packagist Stars Packagist License


Very short description

My Logo

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.

About

A comprehensive package for managing country data in Laravel applications, including multilingual support, geographic coordinates, and detailed metadata for seamless integration with Laravel.

https://lwwcas.github.io/laravel-countries/

License:MIT License


Languages

Language:PHP 100.0%