public static function country($code, $hydrate = true)
    {
        $code = mb_strtolower($code);

        if (! isset(static::$countries[$code])) {
            static::$countries[$code] = json_decode(static::getFile(__DIR__.'/../resources/data/'.$code.'.json'), true);
        }

        return $hydrate ? new Country(static::$countries[$code]) : static::$countries[$code];
    }
public static function country($code, $hydrate = true)
    {
        $code = mb_strtolower($code);

        if (! isset(static::$countries[$code])) {
            static::$countries[$code] = json_decode(static::getFile(__DIR__.'/../resources/data/'.$code.'.json'), true);
        }

        return $hydrate ? new Country(static::$countries[$code]) : static::$countries[$code];
    }
public static function country ( $ code , $ hydrate = true ) { $ code = mb_strtolower ( $ code ) ; if ( ! isset ( static :: $ countries [ $ code ] ) ) { static :: $ countries [ $ code ] = json_decode ( static :: getFile ( __DIR__ . '/../resources/data/' . $ code . '.json' ) , true ) ; } return $ hydrate ? new Country ( static :: $ countries [ $ code ] ) : static :: $ countries [ $ code ] ; }
Get the country by it's ISO 3166-1 alpha-2.

@param string $code
@param bool   $hydrate

@return \Rinvex\Country\Country|array
Get the country by it s ISO 3166 - 1 alpha - 2 .