satoved/percentage
satoved/percentage offers simple helpers for percentage calculations in PHP and Laravel, including percent of a value, percentage change, discounts, and formatted output, with a clean API for everyday pricing and reporting tasks.
A scoped build-vs-buy call for admin UX, not platform infrastructure. The defensible framing is: this is a percentage input/display field for Laravel Nova back-office screens. It supports the decision to not spend engineering days hand-rolling a field when a percentage widget is the entire requirement — with the decision explicitly bounded to internal, staff-correctable surfaces. It is an admin UX accelerator worth roughly a day of a small ticket; it is not a platform dependency and should never appear on a strategic roadmap, gate a release, or sit on a critical path.
Resolving what is actually being bought. The package presents two different identities: the registry metadata says "A Laravel Nova field," while its own description pitches a framework-agnostic percentage calculation helper with optional Laravel integration. Those are different products with different blast radii. The PM decision is to treat it as Nova UI only until source inspection proves otherwise, and to explicitly not assume it replaces domain-level percentage logic. That distinction is the difference between a cosmetic admin field and a silent data-integrity risk in pricing or billing.
Unblocking low-risk internal features. Supports delivery of internal admin capabilities — discount/rate capture, completion or progress values, scoring fields, allocation percentages — inside Nova resources. These are visible, internal-only, staff-correctable surfaces where a wrong value is an annoyance and a correction, not a revenue incident.
Enforcing an architecture boundary as a product decision. Percentage math, rounding policy, unit conventions (0–1 vs 0–100), and validation belong in the application/domain layer where they can be specified and tested. The package handles presentation and input. Making that boundary explicit early prevents the field from quietly becoming the source of truth for business rules, which is exactly the failure mode that turns a one-day admin ticket into a quarter-later data cleanup.
Risk-scoped adoption. With 7 stars, 0 dependents, a single maintainer, and no observable production footprint, the only defensible decision it supports is a contained pilot with a priced in-house fallback — not standardization across admin surfaces, and not a bet on future upstream maintenance. No dependents means no early-warning system: when a Nova upgrade breaks it, we find out in production admin, not in CI.
Greenlight vs. decline, stated crisply. Greenlight for internal-only Nova screens, wrapped and version-pinned. Decline for customer-facing pricing, billing, commissions, financial reporting, or anything where a silent hundred-fold unit error becomes a data-integrity or revenue incident.
Consider it when:
^1.0), wrap the vendor class in an internal App\Nova\Fields\InternalPercentage, and accept that we own maintenance when Nova changes.0, 0.5, 12.5, 100, comma-decimal 12,5, out-of-range 150, non-numeric — not what the form displays.Look elsewhere or build in-house when:
To executives: This is a small, cheap convenience for internal admin screens — a percentage input box, not a platform capability. We are piloting it on one low-traffic Nova resource with an exact version pin and a one-day engineering fallback already costed (a ~100-line custom field). Upside is roughly a day saved on an admin ticket. Downside is bounded: internal-only, staff-correctable data, no customer-facing exposure, and a documented exit. It is not on the roadmap, not a differentiator, and we will not describe it as one.
To engineering: Treat the registry metadata and the package description as describing two different products until you've read src/. If it's a Nova field, wrap it in App\Nova\Fields\InternalPercentage on day one so there's exactly one file to patch, fork, or delete. Pin the exact version. Write characterization tests around persistence before building the feature — the 0.125 vs 12.5 unit error is silent, throws nothing, and surfaces weeks later as "why is every discount showing as 0.12%?". Client-side masking is not validation; enforce with server-side ->rules() regardless of what the field claims. Test a comma-decimal locale. Add "render and persist every percentage field" to the Nova upgrade checklist, because this package almost certainly won't get a patch. If the spike shows a semantic mismatch on storage unit, validation, or locale handling, build our own field — patching a single-maintainer micro-package costs more than writing it, and removes the maintenance, upgrade, and metadata-ambiguity risk at once.
To whoever owns the admin surface after launch: You are the maintainer now. Keep the vendor call site contained, keep rounding and unit conventions in our own mutator or PercentageCalculator implementation, and do not let Percentage::of() spread through controllers and templates. A wrong percentage on an internal screen should be visibly wrong and fixable by staff — never silently wrong and exported into something a customer sees.
How can I help you explore Laravel packages today?