2017 © Pedro Peláez
 

library laravel-fx

Laravel Foreign exchange Package.

image

sungmee/laravel-fx

Laravel Foreign exchange Package.

  • Wednesday, February 7, 2018
  • by sungmee
  • Repository
  • 1 Watchers
  • 0 Stars
  • 10 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Laravel Foreign exchange

Laravel Foreign exchange Package., (*1)

安装

命令行到 Laravel 项目根目录然后:, (*2)

composer require sungmee/laravel-fx, (*3)

Laravel v5.5 以上版本的安装就这些了。

Laravel 5.5 以下版本还要继续操作:

然后在 Laravel 配置文件 config/app.php 中加入:, (*4)

'providers' => [
    Sungmee\LaraFX\ServiceProvider::class,
]

'aliases' => [
    'FX' => Sungmee\LaraFX\Facade::class,
]

使用

// 查询汇率
$base    = 'USD';
$symbols = 'CNY,JPY';
$minutes = 60;
\FX::atm($base, $symbols, $minutes);

// 货币兑换
$money = 100;
\FX::usd2cny(100);
\FX::usd2jpy(100);
...

// 更改默认变量
\FX::setBase('CNY');
\FX::setSymbols('USD');
...

// 更改默认查询网关
\FX::gateway('Fixer')->atm();

扩展网关

在 \Sungmee\LaraFX\Gateways 下新增网关,需要 继承 Fx 类和 GatewayInterface 接口。, (*5)

The Versions

07/02 2018

dev-master

9999999-dev https://github.com/sungmee/laravel-fx

Laravel Foreign exchange Package.

  Sources   Download

MIT

The Requires

 

by Avatar sungmee

laravel packages fx

07/02 2018

0.1.0

0.1.0.0 https://github.com/sungmee/laravel-fx

Laravel Foreign exchange Package.

  Sources   Download

MIT

The Requires

 

by Avatar sungmee

laravel packages fx