Blog Detail


Currency Formatting & Conversion with Laravel Money Package cover image

arrow_back Currency Formatting & Conversion with Laravel Money Package

Laravel Money is a Currency formatting and conversion package for Laravel. This package intends to provide tools for formatting and conversion monetary values in an easy, yet powerful way for Laravel projects.

Why not use the moneyphp package?

Because moneyphp uses the intl extension for number formatting. intl extension isn’t present by default on PHP installs and can give different results in different servers.

Installation & Setup

Run the following command:

composer require akaunting/laravel-money

Register (for Laravel < 5.5)

Register the service provider in config/app.php


Publish config file.

php artisan vendor:publish --tag=money


You can change the currencies information of your app from config/money.php file


This package includes a lot of latest features for doing money operations, comparisons, aggregations, formatting, and parsing:

use Akaunting\Money\Currency;
use Akaunting\Money\Money;

echo Money::USD(500); // '$5.00' unconverted
echo new Money(500, new Currency('USD')); // '$5.00' unconverted
echo Money::USD(500, true); // '$500.00' converted
echo new Money(500, new Currency('USD'), true); // '$500.00' converted
$m1 = Money::USD(500);
$m2 = Money::EUR(500);

$m1->convert(Currency::GBP, 3.5);
$m1->allocate([1, 1, 1]);


money(500, 'USD')

Blade Directives

@money(500, 'USD')

You can learn more about this package by visiting its documentation & source code on Github.

Published at : 02-12-2021

Author : Rizwan Aslam
Rizwan Aslam

I am a highly results-driven professional with 12+ years of collective experience in the grounds of web application development especially in laravel, native android application development in java, and desktop application development in the dot net framework. Now managing a team of expert developers at Codebrisk.

Launch your project

Launch project