wehaa/inline-boolean-field-update
A Laravel Nova package that lets you toggle boolean fields directly from the index list without opening a detail view. Enable inline editing for true/false columns, reducing clicks for quick status updates.
Architecture fit. This is a single Nova field — one class plus one compiled Vue component — that adds a boolean toggle to the resource index table. It has no service provider surface, no config file, no migrations, and no API of its own. Architecturally it is a leaf-node dependency: it either drops into a Nova resource's fields() array cleanly or it doesn't run at all. That simplicity is the whole value proposition and the whole risk. There is nothing to integrate with beyond Nova itself.
The decisive gate is the Nova major version. The package was built against Nova 3 (Vue 2 + Laravel Mix), with compiled assets frozen at 2021-05-31. On Nova 4/5 (Vue 3 + Vite) the shipped dist/js/field.js will not boot. This is a binary, cheap-to-settle question and it should be settled before any further evaluation spend: run composer show laravel/nova, and if it reports 4.x or 5.x, the honest answer is "reimplement natively or fork," not "adopt." Rebuilding the asset requires the laravel-nova build alias, which only exists inside a licensed Nova install — so "just rebuild it" cannot be validated in CI and is not a free fix.
The second gate is the write path. Grep the Vue component for the URL it posts to. If it goes through /nova-api/{resource}/{id} with PUT, then Nova's update controller, update policies, readonly, and canSee all still apply, and the security posture is acceptable. If it posts to a custom route, inline writes bypass policies — treat that as a disqualifier for anything beyond a throwaway spike. This determination takes ten minutes and changes the entire adoption decision.
Technical risk, ranked.
updated observers and spatie/laravel-activitylog work unchanged — but form-derived context (updated_by auto-fill, reason-for-change fields, approval workflows, observers that read $request->input()) is absent. Any observer assuming a form submission will null-reference.<div> with a click handler, not a real <input type="checkbox"> with focus states. If operators use keyboards or you have accessibility obligations, this is a rebuild, not a retrofit.Key questions the TPM should force to closure before a sprint is committed.
Stack fit. Requires Laravel + Laravel Nova + PHP, nothing else. Fit is clean on Nova 3.x; on Nova 4/5 assume incompatibility until proven in a staging panel. There is no server-side footprint — no routes to register, no tables to migrate, no config to publish — so the integration is literally a composer require plus one line in fields().
Three viable paths, and the TPM owns the choice.
| Path | Cost | When it's right |
|---|---|---|
| Adopt as-is (pinned) | ~half a day | Nova 3.x, standard update endpoint, low-consequence flag, team accepts no upstream support |
| Fork and vendor | ~1–2 days including tests and asset rebuild | Nova 3.x but you need styling changes, rollback-on-error, or an audit hook — or you simply don't want to trust pre-compiled dist/ |
| Reimplement natively | ~1 day at this surface area | Nova 4/5, or you have accessibility requirements — build from Nova's official field scaffolding rather than retrofit |
The recommended default is fork and vendor. The package is a few hundred lines end to end; owning it costs less than the ongoing diligence of trusting an unmaintained compiled bundle, and vendoring into packages/ or a private repo under your namespace removes the pre-compiled-asset trust question entirely (you build from source you've read).
Migration and sequencing. The safe rollout is deliberately narrow and time-boxed:
composer.json. Stop here if the gate fails.packages/, pin the commit, register as a path repository. Never take a floating constraint against an abandoned upstream.updated observer / activity log before operators touch the toggle. Retrofitting audit leaves an unbackfillable gap in the history.is_featured-class flags — not is_published, not anything gating access or billing. Keep the native Boolean field on the detail form via ->onlyOnDetail() so validation and reason fields survive on edit, and mark the inline field ->onlyOnIndex().assertDatabaseHas after a successful click. A toggle that renders but doesn't persist is the expected failure mode.PUT /nova-api/{resource}/{id} plus a 403 assertion for a read-only user survives a JS rebuild; a component test does not.Compatibility sequencing against Nova upgrades. Every Nova major upgrade needs explicit runbook steps: rebuild the vendored assets against the new laravel-nova alias, smoke-test the toggle in staging, verify persistence in the DB. That precise step is where the original package stopped being maintained — make it a named line item, not a hope.
Maintenance. Low in absolute terms, non-zero in practice. There is no runtime surface, no dependency tree, no migration drift. The recurring obligation is narrow but real: fork upkeep, an asset rebuild and smoke test on every Nova major upgrade, and no security patches arriving from upstream. Budget roughly 0.5–1 engineer-day per Nova major upgrade, and near-zero in steady state.
Support. Effectively none from upstream — abandoned as of May 2021 with a 3-star, 0-dependent footprint. Internal ownership is mandatory, not optional. The upside: because the package is small and there's no extension surface, the owner reads the whole thing in under an hour, which caps the support burden at "one engineer who has read ~200 lines."
Scaling. The field itself scales trivially — one AJAX PUT per click through Nova's standard update controller, which any admin backend already handles. The scaling concerns are organizational:
Failure modes to instrument and alert on.
fillable/cast issue). Detection: DB-verified feature test in CI, plus periodic spot checks.true, server returned 500. Detection: if forking, add explicit non-2xx revert + error surface.saving/updated observer that reads $request->input('reason') blows up on an inline write. Detection: surfaces as a 500 on the toggle; catch it in staging.canSee alone — canSee hides the button; it does not authorize the write. Detection: the 403 feature test.Ramp-up. Very fast — the field is one line in a resource's fields(). A developer unfamiliar with Nova fields is productive in under an hour; the harder ramp is organizational, not technical: getting audit logging live before enablement, getting the policy and 403 test in place, and getting product agreement that this is scoped to low-consequence display flags only. That conversation is where the real TPM effort sits, and it's the reason to run this as a bounded probe rather than a platform commitment.
Net TPM read. Evaluate it as a UX specification first and a library second. The package's genuine value is that it surfaces the hidden requirements behind "a simple toggle" — audit trails, per-role permissions, rollback semantics, bulk actions, accessibility — early enough to re-scope the estimate before a sprint is committed. Adopt only on Nova 3.x with the standard update endpoint and a low-consequence flag; otherwise vendor the pattern and build it natively in about a day.
How can I help you explore Laravel packages today?