src/Classes/ExchangeRate.php
/**
     * Return an array of the converted values between
     * the given date range.
     *
     * @param  int  $value
     * @param  string  $from
     * @param  string  $to
     * @param  Carbon  $date
     * @param  Carbon  $endDate
     * @param  array  $conversions
     *
     * @return array
     * @throws Exception
     */
Return an array of the converted values between
the given date range.



@return array
@throws Exception
Return an array of the converted values between the given date range . @return array @throws Exception
public function convertBetweenDateRange(
        int $value,
        string $from,
        string $to,
        Carbon $date,
        Carbon $endDate,
        array $conversions = []
    ): array {
        foreach ($this->exchangeRateBetweenDateRange($from, $to, $date, $endDate) as $date => $exchangeRate) {
            $conversions[$date] = (float) $exchangeRate * $value;
        }
        ksort($conversions);
        return $conversions;
    }
public function convertBetweenDateRange ( int $ value , string $ from , string $ to , Carbon $ date , Carbon $ endDate , array $ conversions = [ ] ) : array { foreach ( $ this -> exchangeRateBetweenDateRange ( $ from , $ to , $ date , $ endDate ) as $ date => $ exchangeRate ) { $ conversions [ $ date ] = ( float ) $ exchangeRate * $ value ; } ksort ( $ conversions ) ; return $ conversions ; }
Return an array of the converted values between
 the given date range.
Return an array of the converted values between the given date range .