Programming

PHP And Laravel Package For Fixer.Io

13 Feb 2019 Abbas Ali
PHP And Laravel Package For Fixer.Io

Fixer.io is a simple and lightweight API for current and historical foreign exchange rates. We came across this wonderful service while developing a recent project. I searched but couldn’t find any Fixer.io PHP client fitting our needs for the project so I decided to build a PHP and Laravel package for the same.

Fixer.Io PHP Client

This is a standalone PHP client for fixer.io. It can be easily installed using composer.

composer require ranium/fixerio-php-client

After installation, you can use the client in your code as follows:

You can find the complete installation and usage instructions on the Github project page. Please feel free to report issues or feature requests on Github.

Fixer.Io Laravel 5 Package At Ranium, our framework of choice is Laravel. And the project where we needed a client for fixer.io was being developed in Laravel. So I went ahead and created a Laravel wrapper for the fixer.io PHP client.

You can install the Laravel package with:

composer require ranium/laravel-fixerio

After installation, you need to publish the fixer.io config file.

php artisan vendor:publish --tag=laravel-fixerio

Then edit the fixerio.php config file to put your access key and configure the caching. The Laravel package comes with an additional feature of caching the API responses. This saves your monthly fixer.io bill.

The usage is as simple as

For more details, configuration options and usage please refer the Laravel Fixer.io Github project page. Please feel free to report issues or feature requests on Github.

Note: For more details on all the available API methods and endpoints, please refer the official fixer.io documentation.

Share

Written by

Abbas Ali
Abbas Ali
Director

Abbas leads Ranium's technical vision and client delivery, working hands-on across system architecture, AI integration, and product development. He has years of experience building custom web and mobile applications using Laravel and PHP, and now brings that same depth to AI-powered solutions using models from Anthropic, OpenAI, and Groq. His work spans industries including healthcare, senior living, and property management.

Abbas organizes Laracon India and has spoken at various conferences and meetups on topics ranging from Laravel development to AI-assisted coding workflows. He believes small, focused teams can build remarkable products when they pair strong engineering fundamentals with the right AI tools.

Related Posts

Simple PHP Development Environment on Mac
Programming

Simple PHP Development Environment on Mac

We have quite a few ways to install different versions of PHP in a local development environment. As a developer, we need all those versions to serve different projects. Recently I tried setting up Laravel Valet on my Mac. So this is all about setting and using different PHP versions with valet.

4 Jun 2020 Amit Bhalerao

Want to talk about AI for your business?

Get in Touch Get in Touch