src/Classes/ExchangeRate.php
/**
     * Return an array of available currencies that
     * can be used with this package.
     *
     * @param  array  $currencies
     *
     * @return array
     */
Return an array of available currencies that
can be used with this package.

@param  array  $currencies

@return array
Return an array of available currencies that can be used with this package . @param array $currencies @return array
public function currencies(array $currencies = []): array
    {
        $cacheKey = 'currencies';
        if ($cachedExchangeRate = $this->attemptToResolveFromCache($cacheKey)) {
            return $cachedExchangeRate;
        }
        $response = $this->requestBuilder->makeRequest('/latest', []);
        $currencies[] = $response['base'];
        foreach ($response['rates'] as $currency => $rate) {
            $currencies[] = $currency;
        }
        $this->cacheRepository->storeInCache($cacheKey, $currencies);
        return $currencies;
    }
public function currencies ( array $ currencies = [ ] ) : array { $ cacheKey = 'currencies' ; if ( $ cachedExchangeRate = $ this -> attemptToResolveFromCache ( $ cacheKey ) ) { return $ cachedExchangeRate ; } $ response = $ this -> requestBuilder -> makeRequest ( '/latest' , [ ] ) ; $ currencies [ ] = $ response [ 'base' ] ; foreach ( $ response [ 'rates' ] as $ currency => $ rate ) { $ currencies [ ] = $ currency ; } $ this -> cacheRepository -> storeInCache ( $ cacheKey , $ currencies ) ; return $ currencies ; }
Return an array of available currencies that
 can be used with this package.
Return an array of available currencies that can be used with this package .