square1/nova-metrics
Square1 Nova Metrics adds customizable metric cards to Laravel Nova, helping you display key application statistics and trends directly in your Nova dashboard with simple, configurable value and trend metrics.
ResourceFilter state (filter keys, defaults, authorization, edge cases) into every metric query, plus ongoing Nova-version upkeep. That's a few days of engineering a small MIT package can replace — if it stays compatible with your Nova version. With 27 stars and zero dependents, the decision is really "pilot a cheap dependency with a fork-and-own exit ramp," not "adopt a platform."Value cards for anything expensive; Trend cards issue one query per bucket, so a whereHas filter turns 30 cheap predicates into 30 correlated subqueries.Consider it when all of these hold:
canSee/authorization honored server-side in the metric request, user-dependent options() behaving correctly (it now runs on every card load), whether filter state actually travels into the dashboard render context, and whether whereHas/subquery filters make cards slow.Look elsewhere when:
For executives: Our Nova admin shows dashboard metrics that ignore the filters users apply to the underlying lists, so the numbers disagree and trust in the admin erodes. square1/nova-metrics is a small, MIT-licensed add-on that makes Nova metric cards honor those resource filters. Cost is negligible and it is scoped to internal tooling, so it's a low-risk way to test whether filter-aware admin analytics improves trust and reduces "the numbers don't match" complaints. The caveat is maturity: it's a low-adoption, likely single-maintainer package coupled to closed-source Nova internals. I recommend a pilot in one admin area with a fork-and-own fallback, not a platform commitment — ship behind one surface, measure whether filtered metrics are actually used, and revisit make-vs-buy only if it spreads.
For engineering: This saves us from writing filter-state plumbing into every metric query. Before adoption, confirm Nova/Laravel/PHP compatibility and read the source — correctness depends on non-public Nova behaviour, so it must be proven against the installed version empirically, not inferred from public docs. Pin an exact version — no caret ranges on a zero-dependent package — and add a parity test asserting a filtered metric equals the index page and a hand-written query with identical constraints. Isolate usage behind an internal base card class in app/Nova/Metrics/ so swapping the package for first-party code is a one-file change, and single-source filter definitions from Resource::filters() so the card and the index can't drift into two hand-copied where clauses. Verify server-side filter application (never opaque client-supplied filter state), canSee/authorization behavior across two users of different scopes, options() cost per card load, and query plans for trend metrics where per-bucket filtered queries multiply cost. If the diff is small, forking is acceptable; assign an internal owner either way and add "verify metric cards" to the permanent Nova upgrade checklist.
How can I help you explore Laravel packages today?