rdehnhardt/exchange-rate

基于api fixer.io 自动执行货币转换

v1.0.3 2017-09-13 13:42 UTC

This package is auto-updated.

Last update: 2024-09-07 01:24:18 UTC


README

Author Latest Version Software License Build Status Coverage Status Quality Score Total Downloads

基于api fixer.io 自动执行货币转换

安装

composer require rdehnhardt/exchange-rate

如何使用(自动)

use Rdehnhardt\ExchangeRate\Exchange;

$exchange = new Exchange();
$exchange->rate(10, 'EUR', 'USD'); // 11,933 - at 2017-09-12

如何使用(手动)

use Rdehnhardt\ExchangeRate\Exchange;

$exchange = new Exchange();
$exchange->rate(10, 'EUR', 'USD', 1.2987); // 12,987