Download the PHP package svk-digital/laravel-currency without Composer
On this page you can find all versions of the php package svk-digital/laravel-currency. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download svk-digital/laravel-currency
More information about svk-digital/laravel-currency
Files in svk-digital/laravel-currency
Package laravel-currency
Short Description Extensible Laravel package for working with fiat and crypto currency exchange rates.
License MIT
Informations about the package laravel-currency
Laravel Currency Package
svk-digital/laravel-currency is an extensible Laravel package for working with fiat and crypto currency exchange rates. Out of the box it ships with adapters for the Central Bank of Russia DailyInfo web-service, CurrencyFreaks API, and ExchangeRateHost API, but you can plug in any provider via configuration or custom adapters.
Requirements
- PHP ^8.1
- Laravel 9.x, 10.x, 11.x or 12.x
Quick Start
Installation
The service provider and facade are auto-discovered by Laravel. Publish the configuration:
For advanced usage, you can also publish and customize the service provider:
Documentation
Full documentation is available in the docs/ directory:
- Getting Started - Installation and basic usage
- Configuration - Package configuration options
- Built-in Adapters - Available adapters (CBR, CurrencyFreaks, ExchangeRateHost)
- Testing - Test your code with fake exchange rates
- Custom Adapters - Create your own adapter and override provider selection
Features
- ✅ Multiple built-in adapters (CBR, CurrencyFreaks, ExchangeRateHost)
- ✅ Support for fiat currencies via ISO-4217 value objects
- ✅ Crypto currency support (via custom adapters)
- ✅ Automatic caching with configurable TTL
- ✅ Custom adapter support
- ✅ Dynamic provider selection
- ✅ Comprehensive error handling
- ✅ Multiple quote currencies in a single request
Built-in Adapters
CBR Adapter
- Central Bank of Russia SOAP service
- RUB base currency only
- Historical rates support
CurrencyFreaks Adapter
- REST API integration
- Any base currency support
- API key required
ExchangeRateHost Adapter
- REST API integration
- Any base currency support
- Optional access key
See Built-in Adapters for detailed information.
Custom Adapters
You can create custom adapters to integrate with any currency provider. The package also allows you to override the service provider to implement dynamic provider selection logic without modifying configuration files.
See Custom Adapters Guide for complete instructions.
Testing
The package provides a fake() method on the Currency facade that allows you to mock exchange rates in your tests without making real API calls, similar to Laravel's Http::fake().
License
MIT © Internet Design Studio.
All versions of laravel-currency with dependencies
illuminate/support Version ^9.0|^10.0|^11.0|^12.0
illuminate/http Version ^9.0|^10.0|^11.0|^12.0
illuminate/contracts Version ^9.0|^10.0|^11.0|^12.0
illuminate/cache Version ^9.0|^10.0|^11.0|^12.0
ext-simplexml Version *
ext-libxml Version *
ext-bcmath Version *