Merge pull request #416 from jitendra-webkul/jitendra

Refactor state grouping by country
This commit is contained in:
JItendra Singh 2018-12-27 11:36:17 +05:30 committed by GitHub
commit 9a730af7ed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -584,8 +584,8 @@ class Core
{
$collection = [];
foreach ($this->countries() as $country) {
$collection[$country->code] = $this->states($country->code)->toArray();
foreach ($this->countryStateRepository->all() as $state) {
$collection[$state->country_code][] = $state->toArray();
}
return $collection;