public static function currencySymbol($code = null)
    {
        $localeCode = \Locale::getDefault();
        if ($code !== null) {
            $localeCode .= '@currency=' . $code;
        }
        $formatter = new \NumberFormatter($localeCode, \NumberFormatter::CURRENCY);
        $symbol = $formatter->getSymbol(\NumberFormatter::CURRENCY_SYMBOL);
        return $symbol != $code
            ? $symbol
            : (static::countryCurrencySymbol(substr($code, 0, 2))
                ?: $symbol);
    }
public static function currencySymbol($code = null)
    {
        $localeCode = \Locale::getDefault();
        if ($code !== null) {
            $localeCode .= '@currency=' . $code;
        }
        $formatter = new \NumberFormatter($localeCode, \NumberFormatter::CURRENCY);
        $symbol = $formatter->getSymbol(\NumberFormatter::CURRENCY_SYMBOL);
        return $symbol != $code
            ? $symbol
            : (static::countryCurrencySymbol(substr($code, 0, 2))
                ?: $symbol);
    }
public static function currencySymbol ( $ code = null ) { $ localeCode = \ Locale :: getDefault ( ) ; if ( $ code !== null ) { $ localeCode .= '@currency=' . $ code ; } $ formatter = new \ NumberFormatter ( $ localeCode , \ NumberFormatter :: CURRENCY ) ; $ symbol = $ formatter -> getSymbol ( \ NumberFormatter :: CURRENCY_SYMBOL ) ; return $ symbol != $ code ? $ symbol : ( static :: countryCurrencySymbol ( substr ( $ code , 0 , 2 ) ) ? : $ symbol ) ; }
Returns currency symbol for a ISO 4217 currency code
@param string|null $code the currency code. If null, method will attempt using currency code from current locale.
@return string
Returns currency symbol for a ISO 4217 currency code