kodefarmers/nrb-forex

Laravel Package to consume Nepal Rastra Bank's foreign exchange rate API.

v0.1.2 2024-01-11 10:47 UTC

This package is auto-updated.

Last update: 2024-10-11 12:37:31 UTC


README

A laravel package to consume Nepal Rastra Bank's forex api.

Issues Latest Version Total Downloads

NrbForex is a laravel package that allows for easy comsumption of forex API by Nepal Rastra Bank.

Installation

You can install the package via Composer:

$ composer require kodefarmers/nrb-forex

The Laravel facade and service provider are registered through auto-discovery, so you can instantly start using it.

Publish Config File

You can generate a config file by:

$ php artisan vendor:publish --tag=nrbforex

Usage

This package publishes a Laravel facade for easier usage:

use KodeFarmers\NrbForex\Facades\NrbForex;

return NrbForex::convert(1);
// returns 1 USD to NPR

return NrbForex::from('EUR')->convert(1);
// returns 1 EUR to NPR

You can change the default currency to convert from (it is USD by default) from config/nrbforex.php.

Contributing

We welcome contributions from the community! If you have an idea for a new feature or improvement, please submit a pull request. We also appreciate bug reports and other feedback.

To get started with contributing, simply fork this repository, make your changes, and submit a pull request.

License

This project is licensed under MIT

Self-Promotion

Star the repository on Github

Follow on Github