carlson/nova-link-field is a Laravel package for a laravel nova field for html links..
It currently has 22 GitHub stars and 458.749 downloads on Packagist (latest version v1.1.0).
Install it with composer require carlson/nova-link-field.
Discover more Laravel packages by carlson
or browse all Laravel packages to compare alternatives.
Last updated
This link field adds a customizable link to the Laravel Nova admin Index and Detail views. It can be used to expose clickable links using the data found in your models. For example, wrapping an email address in a mailto: or a Stripe Transaction ID in a link to the Stripe Dashboard.



composer require carlson/nova-link-fielduse Carlson\NovaLinkField\Link;Fields arrayLink::make('Card Transaction', 'transaction_id')
->details([
'href' => function () {
return "https://dashboard.stripe.com/payments/{$this->transaction_id}";
},
'text' => function () {
return $this->transaction_id;
},
'newTab' => true,
'class' => 'no-underline dim text-primary font-bold whitespace-no-wrap',
]),
The Update view exposes the underlying model data as a text input.
The Link field has a custom method details which accepts the following properties (all are required unless otherwise indicated):
href: String | Callabletext: String | CallablenewTab: Boolean | Callableclass: String | Callable (optional) - accepts any Tailwind class namesThe value of the current field can be retrieved and used in the Link by using a Callable and using {$this->field_name}.