Skip to content

Commit

Permalink
Add update instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
antonioribeiro committed Oct 28, 2020
1 parent 49b71b5 commit 1a7bf5c
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -593,8 +593,22 @@ php artisan vendor:publish --provider=PragmaRX\\Countries\\ServiceProvider

## Data

### Sources

This package uses some other open source packages and, until we don't build a better documentation, you can find some more info about data on [mledoze/countries](https://github.com/mledoze/countries/blob/master/README.md) and how to use it on this fantastic [Laravel News article](https://laravel-news.com/countries-and-currencies).

### Updating

The package comes with the `update.php` script, that you can use to update the data it uses. It will download all info from all packages and automatically build the `.json` files we have, so you find something wrong, you can ask those package managers to fix it, and after that you just to run it:

``` bash
cd vendor/pragmarx/countries
composer install
php update.php
```

And wait for a *very long time** (sometimes it looks like stuck but it's not) until it finishes rebuilding everything, then it's just a matter of staging, commit, push all regenerated files, and draft a new PR.

## Cache

Since this data is not supposed to change, calls are automatically cached.
Expand Down

0 comments on commit 1a7bf5c

Please sign in to comment.