The most complete country code list fpackage for laravel
irando/country-codes is a Laravel package for the most complete country code list fpackage for laravel.
It currently has 20 GitHub stars and 212 downloads on Packagist (latest version 2.3.27).
Install it with composer require irando/country-codes.
Discover more Laravel packages by irando
or browse all Laravel packages to compare alternatives.
Last updated
This is a Composer plugin that provides an automated version of Country Codes database.
This database is include: country iso codes, country names, country names with phone codes, phone codes as well as admin page to manage your list of data.

Usage of this package are vary, those were just small examples of what you can do.
Also my main reason to build this package was to send WhatsApp message (specifically OTP codes).
| Source | Version | | :--- | ---: | | Composer | ^2.0 | | PHP | ^7.4/^8.0 /^8.2 |
The only thing you need to do to make this work is adding this package as a dependency to your project:
composer require irando/country-codes
config/app.php file'providers' => [
// ...
Irando\CountryCodes\CountryCodesServiceProvider::class,
];
php artisan vendor:publish
And select id referred to:
Irando\CountryCodes\CountryCodesServiceProvider
OR
php artisan vendor:publish --tag=country-codes
php artisan migrate to add countries table into your databasephp artisan db:seed --class=CountryCodesTableSeeder to seed countries data into countries table.Note: In case of error after this command run
composer dumpautoloadand try again to seed database
Now visit
your_url.tld/country-codesand you are set.
If you need (probably you do!) to customize the look, routing, functionality etc. of this package, at stage 2 of installation we deployed CountryCodes.php which is your table model, as well as view files at resources/views/vendor/irando/country-codes you can edit those files and create your own.
All feedback / bug reports / pull requests are welcome.
This code is released under the MIT license.
For the full copyright and license information, please view the LICENSE file distributed with this source code.
Developed by Robert Nicjoo at CV. IRANDO