Refactor state grouping by country
This commit is contained in:
parent
1bc6ea72e8
commit
336284ee6e
|
|
@ -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;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue