khalin/nova-link-field
A Laravel Nova field for adding clickable link inputs to your resources. khalin/nova-link-field makes it easy to display and manage URLs alongside model fields in Nova admin panels.
Link field extending Nova's base Field plus a ~20-line Vue component." Both land in the same place functionally; only one of them is a permanent line item in your dependency inventory. Framing the package as reference implementation rather than dependency is the highest-value decision this review supports.rel/sanitization policy must live in one wrapper class, not be copy-pasted into every fields() method — that's the difference between a two-hour change and a recurring audit.composer require inside a feature branch.javascript: and data: schemes and emit rel="noopener noreferrer" with target="_blank". Neither behavior is documented here, and the maintainer has been inactive since 2020. That forces an explicit decision: verify and patch in a fork, or avoid the dependency and own the render path from day one.Link on index and detail, editable Text/URL field on forms — needs a product decision, not a developer workaround discovered in production.Consider it when:
composer require resolves cleanly on the first attempt, without widened constraints or --ignore-platform-reqs.src/Link.php and resources/js/components/ and confirmed the component escapes labels safely (v-text, not v-html) and handles target/rel correctly.->exceptOnForms().Look elsewhere or build in-house when:
Nova::script(...) asset registration model — this package ships no service provider, which is itself the failure mode. Expect resolver rejection, a blank field, or a JS mount error that degrades the entire resource page.URL field, a Text field with a resolveUsing/displayUsing callback, or a small in-house field already covers the need.Bail condition, stated plainly: if the install doesn't resolve cleanly on your stack, stop. Don't widen constraints, don't inline-alias, don't replace. The blast radius of a bad field is small — delete one line from fields() — but the maintenance tax is permanent, and the in-house replacement is genuinely a few hours of work.
For executives — the one-line version: This is a tiny UI convenience for internal admin screens, not a platform capability. It is safe to skip, and the cost of recreating it ourselves is measured in hours, not sprints.
The recommendation: Do not adopt khalin/nova-link-field as a production dependency. Treat it as a reference implementation. If clickable links are worth having — and for support and ops teams they usually are — build a small internal Link field in roughly half a day, with URL-scheme validation and safe target/rel handling baked in. You get the same operator experience, zero version risk, and code your team actually owns.
Why not just install it? Three reasons, in order of weight:
rel="noopener noreferrer" on a field that renders admin-pasted URLs from external sources. That's a patch in a fork you didn't want to maintain.For engineering — what "build it" concretely means: a subclass of Laravel\Nova\Fields\Field with a resolver callback for normalization (bare domains → https://, mailto:/tel: opt-in per field) and a small Vue component that escapes labels, rejects non-HTTP schemes, emits safe rel attributes, and renders nothing for null values rather than <a href="">. Keep the editable Text/URL field on forms and show the Link only on index and detail.
The ask: a half-day spike to ship the internal field, or — if you're already pinned to Nova 2/3 and want to move faster — a time-boxed trial of this package on a single resource with the exact version pinned, a named owner in the dependency inventory, and a fork plan in hand. Either way, the outcome is the same: we own the code path that renders URLs in our admin panel. The only variable is whether we start from a clean file or a 2020 fork.
How can I help you explore Laravel packages today?