toArray() ) as $code) { if ($resolvedMetadata = $phoneNumberUtils->getMetadataForRegion($code)) { $phoneCountry = new PhoneCountry(); $phoneCountry->code = $code; $phoneCountry->country_code = $resolvedMetadata->getCountryCode(); $phoneCountry->save(); $this->info($code . ' - ' . $countryCodes[$code] . ' inserted'); } } } }