定制 chistowick/lettuce 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

chistowick/lettuce

Composer 安装命令:

composer require chistowick/lettuce

包简介

The package for receiving and processing currency rates from the Central Bank of the Russian Federation API.

README 文档

README

Description

The package for Laravel. For receiving and processing currency rates from the Central Bank of the Russian Federation API.

Installation

With Composer

$ composer require chistowick/lettuce

Demonstration

<?php

    use Chistowick\Lettuce\ExchangeRatesHandler;

    $erh = new ExchangeRatesHandler();

    // Getting the exchange rate relative to the RUB:
    $erh->usd();
    $erh->eur();

    // Getting a multiplier for converting one currency to another:
    $erh->usdToEur();

    // It will also work
    $erh->USD();
    $erh->USDToEUR();

    // By default, for today:
    echo "USD = {$erh->usd()} RUB";
    echo "EUR = {$erh->eur()} RUB";

    echo "USD to EUR = {$erh->usdToEur()}";

    // or...

    // On the selected date in the YYYY-MM-DD format:
    echo "USD = {$erh->usd('2020-02-29')} RUB";
    echo "EUR = {$erh->eur('2020-02-29')} RUB";

    echo "USD to EUR = {$erh->usdToEur('2020-02-29')}";

    // If you try to get nonexistent data about courses, null is returned.
    $erh->usd('2099-02-29');

Additionally

When trying to get data about courses for tomorrow: 
    1. if the course has not been published yet, null will be returned. 
    2. if the course is already published, you will receive it.

Cache

The received courses will be cached according to the default driver value in the configuration of your Laravel application.

Logging

The program logs exceptions and key points according to the default channel value in the configuration of your Laravel application.

Configuration

The list of downloadable currencies is available in the package by the path: lettuce/config/codes.php

统计信息

  • 总下载量: 6
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-12-01

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固