Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Numeric ISO Codes #4

Open
crypnull opened this issue Jan 13, 2023 · 1 comment
Open

Numeric ISO Codes #4

crypnull opened this issue Jan 13, 2023 · 1 comment

Comments

@crypnull
Copy link

I noticed the countries table does not include the numeric codes, I prefer storing countries by their numeric codes because they don't change like the 2 or 3 letter ones can, they very rarely change, but still do sometimes.

@io238
Copy link
Owner

io238 commented Feb 26, 2023

The Country model has a numeric attribute.

It is not used as primary key, but you can still query countries by their numeric code like this:

\Io238\ISOCountries\Models\Country::whereNumeric(716)->first()

For languages (ISO 639-1) there is no numeric code.

Do you also need the numeric code for currencies? I might be able to add this in a future release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants