Laravel Swap

screenshot of Laravel Swap
laravel

:dollar: Currency exchange rates for Laravel and Lumen

Overview

The Laravel Swap package allows users to retrieve currency exchange rates from various services like Fixer, Currency Data, or Exchange Rates Data and provides an option to cache the results. It supports Laravel version 5.7 or earlier with additional cache dependencies or Laravel 5.8 or later which implements PSR-16 natively.

Features

  • Currency Exchange Retrieval: Retrieve exchange rates from multiple services.
  • Caching Option: Ability to cache the exchanged rates for improved performance.
  • Multiple Service Support: Access rates from services like Fixer, Currency Data, and Exchange Rates Data.
  • Configuration Flexibility: Customize the configuration by copying the package config locally.
  • Laravel Compatibility: Supports Laravel versions 5.5 and above.

For Laravel 5.7 or Lower:

If cache is used, include PSR-6 adapter and PSR-16 bridge cache dependencies. For Laravel 5.8 or higher, these dependencies are not required.

For Laravel 5.5+:

If auto-discovery is not used, add the ServiceProvider to the providers array in config/app.php. To log messages using the facade, add the appropriate configuration in app.php.

For Lumen:

Configure the Service Provider and alias. Copy the configuration to /config/swap.php for customization.

laravel
Laravel

Laravel is a powerful and elegant PHP framework that provides developers with a comprehensive set of tools and features to build robust web applications. It follows the Model-View-Controller (MVC) architectural pattern, offering a clean and organized structure for writing efficient and maintainable code.