Refactor state grouping by country

This commit is contained in:
jitendra 2018-12-27 11:35:10 +05:30
parent 1bc6ea72e8
commit 336284ee6e
1 changed files with 2 additions and 2 deletions

View File

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