ezitisitis / laravel-countries
Bundle for Laravel, which provides ISO 3166_2, 3166_3, currency, Capital, and more data for all countries
1.2.0
2024-05-08 13:33 UTC
Requires
- laravel/framework: ^8.0|^9.0|^10.0|^11.0
This package is auto-updated.
Last update: 2024-11-16 07:43:54 UTC
README
Bundle for Laravel, which provides ISO 3166_2, 3166_3, currency, Capital, and more data for all countries
Notice: this version is for Laravel 8 and above
Installation
Add ezitisitis/laravel-countries
to your composer.json
by running:
composer require ezitisitis/laravel-countries
Run installation command:
php artisan countries:install
NB Installation command supports --force
flag/option to force publishing
Run migration command:
php artisan migrate
Model and data
To change model table go to config/countries.php
and change table_name
value.
NB You will need to make sure that old table is removed.
Now you can seed database by executing:
php artisan db:seed --class=CountriesSeeder
Or by adding seeder to your DatabaseSeeder:
$this->call(CountriesSeeder::class);
and executing:
php artisan db:seed