Laravel package for working with multiple currencies, providing currency conversion, exchange rate management, and formatted output
fomvasss/laravel-currency is a Laravel package for laravel package for working with multiple currencies, providing currency conversion, exchange rate management, and formatted output.
It currently has 3 GitHub stars and 378 downloads on Packagist (latest version 2.8.1).
Install it with composer require fomvasss/laravel-currency.
Discover more Laravel packages by fomvasss
or browse all Laravel packages to compare alternatives.
Last updated
Currency conversion, exchange rates and money formatting for Laravel. Rates come from pluggable providers — Monobank, PrivatBank, NBU, jsDelivr currency-api, ExchangeRatesAPI, CurrencyAPI, Fixer, or your own — and are cached with a fallback for when the API is down.
CurrencyRateFetchFailed eventcurrency:rates and currency:convert commandscomposer require fomvasss/laravel-currency
php artisan vendor:publish --tag=currency-config
CURRENCY_DEFAULT_PROVIDER=monobank
use Fomvasss\Currency\Facades\Currency;
Currency::convert(100, 'USD', 'UAH'); // average rate
Currency::convert(100, 'USD', 'UAH', 'sell');
Currency::getRate('EUR'); // UAH per 1 EUR
Currency::format(1234.5, 'USD'); // "$ 1,234.50"
Currency::useProvider('nbu')->convertAt(100, 'USD', 'UAH', now()->subYear());
php artisan currency:rates --provider=nbu
php artisan currency:convert 100 usd eur --format
Online: https://fomvasss.github.io/laravel-currency/ — the same pages as in docs/.
MIT — see LICENSE.
If this package is useful to you, consider supporting its development:
USDT TRC20 address:
THLgp6DxiAtbNHvgnKV56vk1L38UuUagKf