rimu/formatted-number
A PHP package from rimu for formatting numbers into readable, presentation-ready strings, with support for custom separators, decimals, and locale-style output. Useful for displaying prices, counts, and other numeric values consistently in Laravel or plain PHP applications.
rimu/formatted-number is a single-purpose Laravel Nova field that renders stored numeric attributes with thousands separators, fixed decimals, and currency/percent affixes in index and detail views, leaving the database value untouched. The "buy" side costs no cash but carries real maintenance risk; the honest comparison is "fork-and-own in an hour" versus "write a small custom Number field or a displayUsing() closure using Nova's native options." For a problem this small, those are roughly the same amount of work — and the second has no legacy constraints.displayUsing() closures scattered across resources and the visible inconsistency that follows — staff seeing $1.2M in one place and 1234567.891 in another lose trust in the data.onlyOnIndex() / onlyOnDetail() plus a separate native Number field on forms).composer.json and the field class as the only source of truth.Consider it only when all of the following hold:
Number field and displayUsing() hooks have been evaluated and do not cover a specific, documented requirement you actually have.Look elsewhere when:
Number facade, PHP's NumberFormatter (intl), or moneyphp/money cover locale-aware grouping, currency codes, rounding rules, and minor-unit handling properly. This package does not.$1.2M before $900K), so a formatting field on a sortable header is the wrong tool.For executives: This is a tiny, free, unmaintained Nova add-on that makes numbers in our internal admin panels easier to read. It reaches no customers, touches no transactions, and creates no revenue. The real decision is not "should we buy it" — it's "do we want a small piece of first-party display code, or a six-year-old dependency we'd have to own anyway." For roughly the same effort, we can write the equivalent in-house and carry none of the upgrade risk. Recommendation: treat this as a reference implementation, not a dependency.
For engineering: The package is a Nova field plus one compiled Vue component — no service provider, no facade, no config. Its stated value is fully reproduced by ~30 lines extending Nova's Number field with displayUsing(). Because the last release was 2019 and pins Nova 2/3-era constraints, composer require --dry-run is the first step and a resolution failure is the best outcome. If we adopt anything, we vendor the class into app/Nova/Fields/, add PHP tests around grouping/decimals, scope it to onlyOnIndex()/onlyOnDetail(), pair it with a native Number field on forms, verify numeric sorting per resource, and name an owner. The one thing worth building regardless of which field class we use is a central format map (currency/percent/count) so forty resources stop carrying forty inconsistent number_format() closures.
The decision to record: formatting is display-only, it does not apply to exports or API payloads, and the stored value stays numeric and sortable. That boundary — written down and enforced — is the actual deliverable here, not the package.
How can I help you explore Laravel packages today?