diff --git a/Changelog b/Changelog index 01cd6279f..8b87f6b39 100755 --- a/Changelog +++ b/Changelog @@ -1,4 +1,5 @@ 2018-01-17 DariusIII + * Chg: Update Country class * Chg: Remove countries table as we will use new package with migration and seeding to populate it * Chg: Update Country.php * Chg: Remove $maxage parameter as it is not used in Books class diff --git a/nntmux/utility/Country.php b/nntmux/utility/Country.php index 02778ea30..63ab72b29 100755 --- a/nntmux/utility/Country.php +++ b/nntmux/utility/Country.php @@ -39,7 +39,7 @@ class Country public static function countryCode($country) { if (\strlen($country) > 2) { - $code = CountryModel::query()->where('full_name', $country)->first(['iso_3166_2']); + $code = CountryModel::query()->where('full_name', $country)->orWhere('name', $country)->first(['iso_3166_2']); if ($code !== null && isset($code['iso_3166_2'])) { return $code['iso_3166_2']; }