vioms / laravel-countries
Laravel Countries is a bundle for Laravel, providing Almost ISO 3166_2, 3166_3, currency, Capital and more for all countries.
Requires
- php: ^8.0|^8.1|^8.2|^8.3
- laravel/framework: *
Requires (Dev)
- orchestra/testbench: 7.x-dev
README
Laravel Countries is a bundle for Laravel, providing Almost ISO 3166_2, 3166_3, currency, Capital and more for all countries.
This package can be used standalone or can be combined with:
- vioms/laravel-cities
Inspired by Webpatser:
Installation
Runs composer require vioms/laravel-countries
to install the package
Run composer update
to pull down the latest version of Country List.
Model
You can start by publishing the configuration. This is an optional step, it contains the table name and does not need to be altered. If the default name countries
suits you, leave it. Otherwise run the following command
$ php artisan vendor:publish
You may now run it with the artisan migrate command:
$ php artisan migrate
$ php artisan db:seed --class=CountriesSeeder
After running this command the filled countries table will be available