定制 carlson/nova-link-field 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

carlson/nova-link-field

最新稳定版本:v1.1.0

Composer 安装命令:

composer require carlson/nova-link-field

包简介

A Laravel Nova field for HTML links.

README 文档

README

Purpose

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.

Detail View

Index View

Edit View

Installation

  1. composer require carlson/nova-link-field

Usage

  1. Include the dependency on the Nova Resource use Carlson\NovaLinkField\Link;
  2. Add the resource to the Fields array
Link::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.

API

The Link field has a custom method details which accepts the following properties (all are required unless otherwise indicated):

  1. href: String | Callable
  2. text: String | Callable
  3. newTab: Boolean | Callable
  4. class: String | Callable (optional) - accepts any Tailwind class names

The value of the current field can be retrieved and used in the Link by using a Callable and using {$this->field_name}.

统计信息

  • 总下载量: 408.59k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 22
  • 点击次数: 3
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 22
  • Watchers: 0
  • Forks: 4
  • 开发语言: Vue

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固