Laravel Money

Currency formatting and conversion for Laravel without the intl extension.

Library
Composer
v6.0.3
790stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
48/100Fair
Development Activity8
Maintenance32
Community64
Maturity60
Momentum28

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
80/100Excellent
Architecture75
Code Quality78
Innovation80
Learning Curve85

akaunting/laravel-money is a Laravel package for formatting and converting monetary values. It provides Money and Currency value objects, locale-aware formatting, and conversion helpers, all without depending on PHP’s intl extension — which is not installed by default and can produce inconsistent results across servers. It ships a configurable currency list, Blade and helper integrations, and arithmetic operations that keep monetary amounts consistent throughout a Laravel application.

What You Get

  • Money and Currency value objects for consistent monetary handling
  • Locale-aware formatting that does not require the PHP intl extension
  • A configurable list of currencies with symbols, precision and rules
  • Conversion and arithmetic helpers for monetary amounts
  • Blade directives and helper functions for Laravel views

Common Use Cases

  • Formatting prices consistently across an e-commerce Laravel app
  • Converting between currencies using configured exchange rates
  • Performing safe monetary arithmetic without floating-point surprises

Under The Hood

Architecture - The package models amounts with Money and Currency objects (Akaunting\Money namespace). Currency definitions — symbol, precision, thousands/decimal separators — come from a publishable config file, and formatting is computed from that config rather than PHP’s intl extension, so output is deterministic across servers. A service provider registers the config, helpers and Blade integration.

Tech Stack - PHP 8.2+ built on Laravel’s illuminate contracts, support, validation and view components, plus vlucas/phpdotenv. Tested with PHPUnit and Orchestra Testbench, with Psalm for static analysis.

Code Quality - The repository includes a PHPUnit suite (CurrencyTest, ProviderTest and others) and a Psalm configuration, indicating attention to correctness and types for a focused, well-scoped package.

API Design - The Money/Currency API is expressive and reads naturally, with helper functions and Blade directives for views. Avoiding intl removes a common source of environment-specific surprises, improving predictability.

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search