mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-29 17:28:55 +00:00
Update Country class
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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'];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user