countries icon indicating copy to clipboard operation
countries copied to clipboard

Problem with United Kingdom

Open milosb793 opened this issue 5 years ago • 1 comments

Hey people,

I'm facing an issue with the United Kingdom, it seems like when I pluck just common.name using:

Countries::all()->pluck('common.name');

I'm getting the United Kingdom. But when I do:

Countries::all()->pluck('common.name', 'postal');

the United Kingdom is missing... Any ideas?

milosb793 avatar Jun 05 '19 10:06 milosb793

To be honest, I am getting the issue with getting all timezones. The UK (United Kingdom) is missing but the captial would be London.

$countries = new Countries();

            $collection = $countries->all()->hydrate('timezones')->pluck("timezones");

            $timezones = $collection->mapWithKeys(function($timezones) {
                $zones = [];

                foreach ($timezones as $timezone) {
                    $zones[$timezone['zone_id']] = $timezone;
                }

                return $zones;
            });

@antonioribeiro could you shed some light on this please.

DubStepMad avatar Apr 17 '20 03:04 DubStepMad