Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laracash Laravel Package

andriichuk/laracash

Laracash is a Laravel package for working with money and currencies. It provides simple helpers for formatting, converting, and calculating monetary values, with configurable currency support for consistent cash handling across Laravel applications.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

  • Architecture fit: Laracash is best treated as a Laravel-facing money adapter/value-object layer, likely wrapping moneyphp/money, rather than a billing, ledger, tax, or FX engine. It fits Laravel monoliths and modular Laravel services that need currency-safe amount handling, formatting, parsing, validation, and Eloquent casts. It is a poor fit as the system of record for complex multi-currency accounting, settlement, or reconciliation without additional domain modeling.
  • Integration feasibility: Feasible via Composer, Laravel auto-discovery/service provider, config publication, Money value objects, Blade/helper formatting, validation rules, and model casts. The real effort is not package installation but enforcing monetary conventions: minor-unit storage, currency precision, rounding policy, null/zero semantics, and locale-aware input/output.
  • Technical risk: The package is small, single-maintainer, and low-adoption (75 stars), with the last release in May 2024. That creates maintenance and Laravel/PHP compatibility risk, especially against current Laravel and PHP versions. MIT licensing is favorable, but there is no commercial support. Money bugs are high-impact, so the package must be pinned, covered by application tests, and isolated behind an internal money abstraction.
  • Key questions: Which Laravel and PHP versions are supported today? Which moneyphp/money version is required? Does it handle Eloquent casts, validation, locale formatting, parsing, and multi-currency correctly? How are rounding, allocation, and currency precision exposed? Are database values stored as integer minor units? Is ext-intl required? What is the test coverage and upgrade history? Can we fork/vendor it if maintenance stalls?

Integration Approach

  • Stack fit: Use Laracash at Laravel boundaries: HTTP validation, Blade/API formatting, Eloquent casts, and application services. Keep a project-owned MoneyService or value-object wrapper so domain code does not depend directly on the vendor facade. Pair it with moneyphp/money conventions and explicit database storage rules.
  • Migration path: Inventory existing monetary columns and code paths first. Move toward integer minor units plus currency code where feasible; if legacy decimal/float columns exist, introduce casts and conversion at boundaries, backfill carefully, and run dual-read/dual-write only where needed. Migrate new code first, then high-value existing flows, then remaining formatting paths.
  • Compatibility: Validate Composer constraints against the target Laravel/PHP matrix, ext-intl, database driver, and frontend formatting expectations. Pin the package and transitive dependencies, and add a compatibility test job for supported Laravel versions. If current Laravel support is missing, budget for a fork or replacement.
  • Sequencing: 1) Spike in a branch with representative currencies, rounding cases, and Eloquent models. 2) Define storage, rounding, and null/zero standards. 3) Add dependency and internal wrapper. 4) Implement validation, casts, and formatters behind feature flags. 5) Backfill and reconcile test data. 6) Roll out by domain flow. 7) Add monitoring and upgrade tests before broad adoption.

Operational Impact

  • Maintenance: Low runtime footprint but non-trivial dependency maintenance. Expect Dependabot/security review, periodic Laravel compatibility checks, and a contingency plan to fork or replace. Small maintainer capacity means upgrades may lag; pin versions and avoid spreading direct usage.
  • Support: Community/MIT only. Internal ownership is required for money semantics, incident response, and documentation. Establish an internal runbook for rounding disputes, currency mismatches, and display/parse defects.
  • Scaling: Mostly application CPU and database impact; formatting/parsing is cheap at normal request volumes. Risk grows with report generation, bulk imports, and exports. Cache formatted display strings only when safe; never use cached formatted values for calculations.
  • Failure modes: Incorrect rounding or allocation, float contamination, currency mismatch, locale parsing errors, minor-unit/major-unit confusion, null/zero handling, overflow on large amounts, Eloquent cast failures, and dependency conflicts during framework upgrades. These are correctness failures, not just availability failures.
  • Ramp-up: Laravel developers can adopt the facade/helpers quickly, but the team needs explicit training on money domain rules: minor units, currency precision, rounding modes, parsing, and storage. Budget a short enablement session plus shared examples and tests before rollout.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource