All Projects ā†’ akaunting ā†’ Laravel Money

akaunting / Laravel Money

Licence: mit
Currency formatting and conversion package for Laravel

Projects that are alternatives of or similar to Laravel Money

Money
PHP implementation of Fowler's Money pattern.
Stars: āœ­ 3,868 (+1381.99%)
Mutual labels:  currency, currency-converter, money
react-local-currency
šŸ’µ šŸ’“Shows the price of your services in the customer's currency šŸ’¶ šŸ’·
Stars: āœ­ 21 (-91.95%)
Mutual labels:  money, currency, currency-converter
Laravel Swap
šŸ’µ Currency exchange rates for Laravel and Lumen
Stars: āœ­ 296 (+13.41%)
Mutual labels:  currency, currency-converter, laravel
Money
A money and currency library for PHP
Stars: āœ­ 855 (+227.59%)
Mutual labels:  currency, currency-converter, money
Laravel Cconverter
A simple currency converter plugin for Laravel 5. Currency providers: The European Central Bank, OpenExchange, CurrencyLayer and fixer.io
Stars: āœ­ 39 (-85.06%)
Mutual labels:  currency, currency-converter, laravel
Swap
šŸ’± Currency exchange rates library
Stars: āœ­ 1,195 (+357.85%)
Mutual labels:  currency, currency-converter, money
Android Money
Simple money and currency converter library for android.
Stars: āœ­ 66 (-74.71%)
Mutual labels:  currency, currency-converter, money
currency-converter
šŸ’° Easily convert between 32 currencies
Stars: āœ­ 16 (-93.87%)
Mutual labels:  money, currency, currency-converter
javascript-forex-quotes
JavaScript Library for fetching realtime forex quotes.
Stars: āœ­ 38 (-85.44%)
Mutual labels:  currency, currency-converter
django-prices-openexchangerates
openexchangerates.org support for django-prices
Stars: āœ­ 33 (-87.36%)
Mutual labels:  money, currency
Guide-to-Swift-Numbers-Sample-Code
Xcode Playground Sample Code for the Flight School Guide to Swift Numbers
Stars: āœ­ 92 (-64.75%)
Mutual labels:  money, currency
GoCurrency
Simple currency converter. Insert an amount, what currency to convert from and what currency to convert to.
Stars: āœ­ 29 (-88.89%)
Mutual labels:  currency, currency-converter
stockholm
šŸ’µ Modern Python library for working with money and monetary amounts. Human friendly and flexible approach for development. 100% test coverage + built-in support for GraphQL and Protocol Buffers transports using current best-practices.
Stars: āœ­ 26 (-90.04%)
Mutual labels:  money, currency
pesa
A JS money lib whose precision goes up to 11 (and beyond).
Stars: āœ­ 38 (-85.44%)
Mutual labels:  money, currency
historical-bank-ruby
A Ruby Bank that serves historical exchange rates
Stars: āœ­ 14 (-94.64%)
Mutual labels:  currency, currency-converter
php-currency-api
Standardized wrapper for popular currency rate APIs. Currently supports FixerIO, CurrencyLayer, Open Exchange Rates and Exchange Rates API.
Stars: āœ­ 17 (-93.49%)
Mutual labels:  currency, currency-converter
Coinc
šŸ’°šŸ’±Alfred Workflow for currencies conversion
Stars: āœ­ 38 (-85.44%)
Mutual labels:  currency, currency-converter
money-parser
Price and currency parsing utility
Stars: āœ­ 26 (-90.04%)
Mutual labels:  money, currency
react-numeric
A react component for formatted number form fields
Stars: āœ­ 30 (-88.51%)
Mutual labels:  money, currency
Narvalo.NET
Applied functional patterns for C#. Money and Currency types. MVP framework. (Obsolete)
Stars: āœ­ 16 (-93.87%)
Mutual labels:  money, currency

Currency formatting and conversion package for Laravel

Downloads Tests StyleCI Quality License

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.

Getting Started

1. Install

Run the following command:

composer require akaunting/laravel-money

2. Register (for Laravel < 5.5)

Register the service provider in config/app.php

Akaunting\Money\Provider::class,

3. Publish

Publish config file.

php artisan vendor:publish --tag=money

4. Configure

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

Usage

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

Advanced

$m1 = Money::USD(500);
$m2 = Money::EUR(500);

$m1->getCurrency();
$m1->isSameCurrency($m2);
$m1->compare($m2);
$m1->equals($m2);
$m1->greaterThan($m2);
$m1->greaterThanOrEqual($m2);
$m1->lessThan($m2);
$m1->lessThanOrEqual($m2);
$m1->convert(Currency::GBP, 3.5);
$m1->add($m2);
$m1->subtract($m2);
$m1->multiply(2);
$m1->divide(2);
$m1->allocate([1, 1, 1]);
$m1->isZero();
$m1->isPositive();
$m1->isNegative();
$m1->format();

Helpers

money(500, 'USD')
currency('USD')

Blade Directives

@money(500, 'USD')
@currency('USD')

Changelog

Please see Releases for more information what has changed recently.

Contributing

Pull requests are more than welcome. You must follow the PSR coding standards.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see LICENSE for more information.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].