neputertech/nrb-forex-api 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

neputertech/nrb-forex-api

Composer 安装命令:

composer require neputertech/nrb-forex-api

包简介

Fetch Nepal Rastra Bank Forex Api

README 文档

README

The neputertech/nrb-forex-api package provides easy access to the forex rate fixed by Nepal Rastra Bank for different countries to Nepali Rupees(NPR).

Installation

Installation is straightforward, setup is similar to every other Laravel Packages.

1. Install via Composer

Begin by pulling in the package through Composer:

composer require neputertech/nrb-forex-api

2. Define the Service Provider and alias

Note: This package supports the new auto discovery features of Laravel >=5.5, so if you are working on a Laravel >=5.5 project, then your installation is complete, you can skip to step 3.

Add manually the service provider in your config/app.php file :

'providers' => [
    // ...
    NeputerTech\NrbForexApi\NrbForexApiServiceProvider::class,
];

Add manually the facade in your config/app.php file :

'aliases' => [
    // ...
    NeputerTech\NrbForexApi\Facades\NrbForexApi::class,
];

3. Publish Config File

To generate a config file type this command into your terminal:

php artisan vendor:publish --tag=nrb-forex-api

Usage

Using the NrbForexApi package, it's quite easy to get the current rate's.

We have the NeputerTech\NrbForexApi\NrbForexISO3 for ISO3 list of constants to be used.

Using with facade

  • Getting the current rate for US Dollar to Nepali Rupees :
 NrbForexApi::to(\NeputerTech\NrbForexApi\NrbForexISO3::US_DOLLAR)->convert(5);
 // Outputs : (Right now, US Dollar per unit === 122.24 NRS)
 611.2

Using with helpers

  • Getting the current rate for Indian Rupees to Nepali Rupees :
 nrb_forex_convert(\NeputerTech\NrbForexApi\NrbForexISO3::INDIAN_RUPEE, 100)
 // Outputs : (Right now, Indian ruppee per 100 unit === 160 NRS)
 160

TODO

  • Get the list of rates for all available currencies provided by Nepal Rastra Bank
  • More flexible Api

License

The MIT License (MIT). Please see License File for more information.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-05-19

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固