Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Nova Link Field Laravel Package

upline/nova-link-field

A Laravel Nova field that renders values as clickable links, letting you display URLs, emails, or custom targets directly in Nova resources and index views. Simple to configure and easy to drop into any Nova fieldset, it turns plain text into actionable links with minimal setup.

View on GitHub
Deep Wiki
Context7

Getting Started

Minimal setup:

composer require upline/nova-link-field

Then inspect the package source/README before wiring it up, since this is a very small package and the exact field class/API matters:

cat vendor/upline/nova-link-field/README.md
ls vendor/upline/nova-link-field/src

Add the field to a Nova resource. Adjust the class name to match the package source:

use Upline\NovaLinkField\LinkField;

public function fields(NovaRequest $request): array
{
    return [
        LinkField::make('Website', 'website')
            ->rules('nullable', 'url')
            ->sortable(),
    ];
}

First use case: show a clickable website/vendor/documentation URL in a Nova resource index or detail page without exposing the raw URL as editable text. Treat this as display sugar: the underlying column is still a normal string/URL column in your model.

Where to look first:

  • README.md for the package’s supported field name and fluent methods.
  • src/ for the Nova field class, meta(), resolve(), and any custom methods.
  • resources/js/ for the Vue component behavior, especially how it builds the href and label.
  • Your Nova resource for whether the field is used on index, detail, or forms.

Implementation Patterns

Use it as a read-only display field alongside a normal editable field when editors need to change the URL:

Text::make('Website', 'website')
    ->rules('nullable', 'url')
    ->hideFromIndex(),

LinkField::make('Website', 'website')
    ->onlyOnIndex()
    ->rules('nullable', 'url'),

Show a friendlier label while linking to the stored URL:

LinkField::make('Website', 'website')
    ->displayUsing(fn ($value) => $value ? parse_url($value, PHP_URL_HOST) : '—')
    ->nullable(),

Use Nova visibility helpers to avoid cluttering forms:

LinkField::make('Documentation', 'docs_url')
    ->onlyOnDetail()
    ->rules('nullable', 'url');

For computed or non-HTTP links such as mailto: or tel:, do not blindly apply the url rule; use a custom validation rule and confirm the Vue component renders the scheme correctly.

If the package supports target-window configuration, prefer opening external links in a new tab with safe attributes. If not, keep links in the same tab or extend the field’s Vue component.

Recommended day-to-day workflow:

  1. Store the URL in a normal database column.
  2. Keep an editable Text/URL field for forms.
  3. Use LinkField only on index/detail views.
  4. Validate and sanitize user-supplied URLs before rendering.
  5. Test null, empty, and malformed values explicitly.

Gotchas and Tips

  • This package has very low adoption: 1 star, 0 dependents, and last release in May 2023. Treat it as a small convenience package, not infrastructure. Review the source and lock the version.
  • Verify Nova compatibility. A 2023 release may target Nova 4; test against your Nova version, especially if using Nova 5.
  • Do not guess the class name or fluent API. The package is small enough that vendor/upline/nova-link-field/src is the source of truth.
  • Because it is a custom Nova field, asset registration matters. If the field renders blank, check the service provider for Nova::script()/Nova::style() and confirm the compiled assets exist.
  • Null handling is the most common failure point. A null URL can render as an empty link or literal null; use ->nullable() and a fallback label.
  • Avoid rendering untrusted URLs without validation. A URL field should reject javascript: and similar schemes; the url rule helps, but test edge cases.
  • If using displayUsing(), confirm the callback affects only the visible label, not the actual href. Test in Nova’s index and detail views.
  • Use browser devtools to inspect the field component props if the link is wrong. Check the Nova field’s meta() payload and the stored resource value.
  • If you only need a simple clickable URL, compare against Nova’s built-in URL field first. This package is worth using only when its rendering behavior saves you from writing a custom field.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource