dougsisk / laravel-country-state Goto Github PK
View Code? Open in Web Editor NEWA helper to list countries & states in English in Laravel 5.1+
License: MIT License
A helper to list countries & states in English in Laravel 5.1+
License: MIT License
Just got this notice on my last composer update:
Package rinvex/country is abandoned, you should avoid using it. Use rinvex/countries instead.
@DougSisk Ive experienced an increase x2 in memory usage. In total about 5MB just to run CountryState::getStates('US)
. Is this increase something that comes with the territory when not using a database or am I using your package incorrectly?
Someone was going to make this.....so here it is.
Unfortunately the underlying country/state package does not support PHP 8 yet, which causes the composer require to fail for this package. I've created a PR and hope it's merged soon.
Hello, can you inform if the data is stored locally in a file somewhere in the package or is it being fetched from an API?
What is the source of the data being returned?
Thank you.
The states ISO2 codes are not updated with the new ISO2 code.
for example
Country: China
State / Prov.: Beijing Shi
The CountryState returning the code as 11, but it`s already updated to BJ
So the package is throwing exception while getting the state name by BJ.
I installed this package, When I call It
$countries = CountryState::getCountries();
, It gives me this Error
Non-static method DougSisk\CountryState\CountryState::getCountries() should not be called statically
Something is not right...
Nothing happens on the 3rd step,
where you do
php artisan vendor:publish
It is possible to only get the countries that have states? For example, if I just call CountryStates::getCountries()
there is for example the country AW
. But CountryState::getStates('AW')
is empty..
Great package!
One quick question. When I've linked a country code (for example us or gb)
to a users table.
How would I eager load the country?
Thanks a lot!
Thoughts on getting this package to use rinvex/countries' newest release (v 6)?
Hey, Fantastic package, thank you so much! To make your package compatible with php 5.4, I only had to change ::class to the full hard coded version 'DougSisk\CountryState\CountryStateServiceProvider'
Apparently, for 2.0 version, the URL country-state/get-states to fetch states for a country was removed. Is this correct? We will now have to write our own?
return CountryState::getCity('AA');
this suppose to be in the API needed
The underlaying class used to load the countries & states, phine/country, has been marked as abandoned on Packagist. Need to research a good replacement. Most likely will be a major new release (2.0). Considering using something that has other languages besides English.
Problem 1
- Conclusion: don't install dougsisk/laravel-country-state 2.1.1
- Conclusion: remove laravel/framework v6.0.1
- Installation request for dougsisk/laravel-country-state ^2.1 -> satisfiable by dougsisk/laravel-country-state[2.1, 2.1.1].
- Conclusion: don't install laravel/framework v6.0.1
Otherwise, we have to republish everything for every installed package. See https://laravel.com/docs/5.2/packages#publishing-file-groups
I need to get Country or State full name form ISO Code
some thing llike this:-
$countryName = CountryState::getCountryName('US');
then $countryName
will have value United States, and same for StateName.
Is there any way to get that here.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.