- Does carlson/nova-link-field work with Laravel Nova 4 or Nova 5?
- Almost certainly not. The last release was 2020-02-26, which places it in the Nova 2/3, Vue 2 and Laravel Mix era, while Nova 4 and 5 ship a Vue 3 frontend that a 2020-era compiled field bundle will not mount. The dangerous part is that it usually fails silently: a clean Composer install succeeds and you get a blank column rather than an error. Confirm the Nova major pinned in your composer.lock and run composer why-not carlson/nova-link-field before doing any work.
- How do I install carlson/nova-link-field?
- The usual flow is composer require carlson/nova-link-field and then adding Link::make('website') to the fields method of the relevant Nova resource. There is no migration, config file or service contract to wire up because the field simply reads an existing string column. Be aware that packages of this vintage predate universal Nova asset discovery, so verify the compiled field asset actually registers in your panel.
- How do I open a link in a new tab with this Nova link field?
- The field exposes fluent setters for target behaviour, typically target('_blank') or an openInNewTab() style helper. Setter spellings drifted across Nova field packages of this era, so grep src/Link.php, which is the entire API surface, before writing the field into twenty resources. If you open links in a new tab, make sure the rendered anchor also carries rel="noopener noreferrer".
- How do I change the display label of a link in Laravel Nova?
- The package supports a configurable label so you can show readable text such as Open asset instead of the raw URL, using the field's fluent text() style setter. Because the exact setter name is not guaranteed, read src/Link.php or the compiled Vue components to confirm whether it is text(), label() or similar. The label is presentational only and does not affect the stored value.
- Is carlson/nova-link-field still maintained?
- No. The last release was 2020-02-26, the repository has roughly 22 stars and zero dependents, so nobody has validated it against a modern Nova upgrade. Treat it as sample code rather than a dependency: vendor the source into your own app, whether by copying it into app/Nova/Fields/Link or scaffolding a first-party field and porting the behaviour. That keeps it under your CI, code review and composer audit instead of surfacing later as an unmaintained transitive dependency.
- Can I edit URLs with carlson/nova-link-field, or is it display-only?
- Architecturally it is a presentational field: one string attribute in, one anchor out, with no storage layer or model concern. The idiomatic pattern is a split pair on the same attribute, using Text::make('website')->onlyOnForms()->rules('nullable', 'url') for editing and Link::make('website')->exceptOnForms() for display. That sidesteps any question about whether the field supports editing and keeps a plain input box for operators pasting new URLs.
- Is carlson/nova-link-field safe from XSS?
- A link field is the textbook admin-panel XSS surface, and 2020-era components routinely omit rel="noopener noreferrer" or fail to reject javascript: and data: schemes. Ask whether the value can ever be written by a non-superadmin, a CSV import or an upstream API, because in that case href is hostile input in your context. If any of those are true, add server-side URL validation or do not use this field at all.
- What should I use instead of carlson/nova-link-field on Nova 4 or 5?
- Reimplement it first-party. The whole behaviour is roughly 60 to 120 lines: scaffold with php artisan nova:field acme/link, then port the anchor rendering into the Vue 3 index and detail components. On Nova 4 and 5 the package is effectively a specification rather than a dependency, so copying the idea costs less than fighting a five-year-old build toolchain.
- Does carlson/nova-link-field require migrations or database changes?
- No. It takes an existing string column and renders it as an anchor in Nova's index and detail views, with no migration, no storage layer, no model concern and no service contract. That makes adoption a UI polish decision scoped to your admin panel rather than an architecture decision. Plan and track the work as internal tooling rather than product capability.
- Why is my Nova link column blank after installing carlson/nova-link-field?
- A blank column is the known silent failure mode and it looks identical to having no data. Common causes are a component-name mismatch, a missing dist/js/field.js in the package, or a Vue 2 bundle that cannot mount on Nova 4 or 5. Check the browser console first, then read resources/js/components/IndexField.vue, DetailField.vue and the committed dist asset to confirm what is actually being registered.