https://github.com/ezitisitis/laravel-countries
https://github.com/ezitisitis/laravel-countries
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/ezitisitis/laravel-countries
- Owner: ezitisitis
- License: mit
- Created: 2023-01-04T10:36:27.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2024-09-16T07:18:58.000Z (almost 2 years ago)
- Last Synced: 2025-02-05T19:18:40.426Z (over 1 year ago)
- Language: PHP
- Size: 234 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Laravel Countries
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:
```bash
composer require ezitisitis/laravel-countries
```
Run installation command:
```bash
php artisan countries:install
```
**NB** Installation command supports `--force` flag/option to force publishing
Run migration command:
```bash
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:
```bash
php artisan db:seed --class=CountriesSeeder
```
Or by adding seeder to your DatabaseSeeder:
```php
$this->call(CountriesSeeder::class);
```
and executing:
```bash
php artisan db:seed
```
## Credits
- [Marks Bogdanovs](https://www.ezitisitis.com)