countries
countries copied to clipboard
Problem with United Kingdom
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?
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.