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
Formatted Number

Formatted Number Laravel Package

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.

View on GitHub
Deep Wiki
Context7

A Laravel Nova field.

Frequently asked questions about Formatted Number
How do I install rimu/formatted-number in a Laravel app?
Run composer require rimu/formatted-number, but first run composer require rimu/formatted-number --dry-run to confirm dependency resolution. The package is a Laravel Nova field, so laravel/nova must already be installed and resolvable. After installing, you may optionally publish nova-assets and run nova:publish. There is no service provider, publishable config, or Blade helper to register.
Does rimu/formatted-number work with Laravel Nova 4 or Nova 5?
Almost certainly not. The last release was 2019-10-25 and composer.json pins Nova ^2.0 or ^3.0 with PHP 7.x, so Composer resolution will likely fail on Nova 4 or 5. Even if it resolves, the compiled Vue component was built with legacy FormField and DetailField mixins and Mix conventions, which may not register or may throw in the browser. Treat the dry-run result as the gating fact before any design work.
Is rimu/formatted-number a general number formatting library for Laravel?
No. Despite the description, the artifact is a single PHP class extending Laravel\Nova\Fields\Field plus a compiled Vue component. There is no facade, no service provider, no publishable config, and no Blade helper. It is only relevant if Nova is already your back-office surface and the gap is genuinely in resource display, not in APIs, exports, Blade, Filament, or Inertia.
What PHP and Laravel versions does rimu/formatted-number support?
Realistic fit is Nova 3 on PHP 7.x only, based on the 2019 release date and the laravel/nova and php constraints in composer.json. There has been no compatibility work past the Nova version it shipped against. If you are on PHP 8 or Nova 4/5, it is out of scope by construction because the entire value is the Nova field contract.
How do I keep rimu/formatted-number display-only in a Nova resource?
Chain onlyOnIndex() and onlyOnDetail() on the field so it never appears on create or update forms. This structurally enforces display-only use and avoids the write-path risk. Confirm the requirement is strictly presentation before adopting it. If the column must remain editable, do not use this field.
Does formatting numbers with rimu/formatted-number break Nova sorting and search?
It can silently degrade both. Formatted strings sort lexically, so $1.2M can appear before $900K, and Nova's numeric sort and search behavior must be verified per column rather than assumed. Decide up front whether any target columns need to remain sortable or searchable. If they do, a display-only formatted field may not be the right tool.
Is it safe to use rimu/formatted-number on editable Nova forms?
No, that is the one failure mode that escapes the otherwise favorable containment. If a formatted string round-trips through an edit form, a rounded or locale-mangled value can be written back to storage. Restrict the field to index and detail views with onlyOnIndex() and onlyOnDetail(). Keep the raw numeric value as the source of truth everywhere else.
Can the PHP class and Vue component show different formatted numbers?
Yes, locale and format drift between the PHP class and the Vue component is a real risk. If both format with different settings, index, detail, and form views can show different numbers for the same record. That is a trust failure worse than showing raw values like 1234567.891. Verify consistency across all three views before rollout.
Is rimu/formatted-number actively maintained?
No. It has 2 stars, 0 dependents, no release in six years, and presumably no tests. There is no issue triage, no security response, no Stack Overflow corpus, and no compatibility work past the Nova version it shipped against. If you vendor it, name an owner and budget maintenance time for every Nova upgrade, because every bug becomes yours.
What is a simpler alternative to rimu/formatted-number for Nova number formatting?
Write the in-house equivalent first: a small class extending Laravel\Nova\Fields\Number that uses displayUsing() with number_format, roughly 30 lines. Add currency or decimal helpers as needed and keep it display-only. If that meets every documented requirement, the case for adopting this package collapses. Laravel's Number helper or PHP's NumberFormatter are also viable outside Nova.
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.
abbasudo/artisan-route
mirvan/ippanel
ignibyte/aic-framework
glavweb/data-schema-bundle
glavweb/datagrid-bundle
tacticmedia/scim-server
uni-method/frame
neika-ai/sdk
adachsoft/php-code-style
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
adachsoft/api-version-bundle
cgv/localized-resource
noith/settings
kda/laravel-package