dariusiii/laravel-countries

This package is abandoned and no longer maintained. No replacement package was suggested.

Laravel Countries is a bundle for Laravel, providing Almost ISO 3166_2, 3166_3, currency, Capital and more for all countries. Bug kudos to Christoph Kempen, on whose work this package is heavily based (webpatser/laravel-countries).

v2.0.0 2019-09-11 07:01 UTC

This package is auto-updated.

Last update: 2022-05-10 15:51:29 UTC


README

License Total Downloads Latest Stable Version Latest Unstable Version

Laravel Countries is a bundle for Laravel, providing ISO 3166_2, 3166_3, currency, capitals and more for all countries.

This package has been forked from bhuvidya/laravel-countries.

Installation

Add dariusiii/laravel-countries to your app:

$ composer require "dariusiii/laravel-countries

Configuration

You can elect to manage your own configuration. This is an optional step, it only contains the table name and does not need to be altered. If the default table name countries suits you, leave it. Otherwise run the following command

$ php artisan vendor:publish --provider='DariusIII\Countries\CountriesServiceProvider' --tag=config

The config file can then be found at config/countries.php.

Migrations

The service provider automatically adds the package's migrations to your app.

Seeding

There is a seeding module in the package. You can either run the seeder manually from the command line:

$ php artisan db:seed --class='DariusIII\Countries\CountriesSeeder'

Otherwise you can add it to one of your app's database seeder files, probably database/seeds/DatabaseSeeder.php:

use DariusIII\Countries\CountriesSeeder;

/**  
 * Run the database seeds.
 *    
 * @return void 
 */ 
public function run()
{        
    ...
    $this->call(CountriesSeeder::class);
    ...
}