sietse85/nova-button
Add customizable action buttons to Laravel Nova resources with sietse85/nova-button. Trigger links, modal forms, or custom logic directly from resource pages, dashboards, and toolbars using simple, flexible configuration.
Architecture fit
dist/. No migrations, no published config, no service provider registration beyond Composer auto-discovery. That means it touches no data model, no queue topology, and no service boundary — the integration surface is confined to Nova resource fields() methods.Integration feasibility
composer require sietse85/nova-button, pin an explicit tag, and a Nova-fluent developer has a rendered button in well under a day. There is no infrastructure work, no capacity negotiation with front-end, and no design cycle.App\Nova\Fields\ActionButton extends Sietse85\NovaButton\Button) that re-exposes only the fluent API you actually use. This converts exit cost from "grep every resource" to "rewrite one file" and is the single decision that makes the vendor risk acceptable.Technical risk
dist/ is prebuilt JS running inside your highest-privilege authenticated UI. Either rebuild from source in CI and diff, or have someone read it. This is a security review item, not an ops convenience, and it is the step that is routinely skipped.canSee, confirm(), and disabled states are all client-side UX hygiene. Every backing route and Action must independently enforce Nova's guard, CSRF, and your policies. A determined user can POST the URL directly.Key questions for the adopting team
firstOrCreate on a job key, lock)?dist/ from source, or do we accept and vendor a reviewed build?Stack fit
POST /admin/{resource}/{id}/do-thing controller endpoints per button are the anti-pattern to prohibit explicitly in the team conventions doc.Migration path
Compatibility
composer update outcomes.vendor/sietse85/nova-button/src/ at the pinned tag, not against the README or memory. The README documents a snapshot, not a contract; the source is authoritative.Sequencing
ActionButton before the second usage so no call site ever references the vendor class.canSee policy gate, and server-side idempotency.operatorButtons() method so there is one file to review at Nova-upgrade time and one file to hand a security reviewer.Maintenance
Support
Scaling
onlyOnDetail().canSee closures that dereference relationships will produce N+1s on index views at scale. Either eager-load in indexQuery or restrict to detail.Failure modes
| Failure | Signal | Mitigation |
|---|---|---|
| Nova upgrade breaks the component | Blank cell / console error, no 500 | Post-upgrade staging click-through checklist |
| Backing route renamed | Silent 403/404 invisible to operator | Button→endpoint mapping doc; server-side click logging |
| Double-click on non-idempotent action | Duplicate side effects | Server-side guard: status check, job key, lock |
| Policy drift | Button shown/hidden incorrectly | Field test asserting canSee returns expected value per model/user; route test for 401/403 |
Unreviewed dist/ asset |
Supply-chain exposure | Rebuild from source in CI and diff, or vendor a reviewed build |
Ramp-up
canSee, onlyOnDetail) is small enough to learn from source in a sitting.How can I help you explore Laravel packages today?