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

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

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

khalin/nova-link-field

最新稳定版本:v1.2.4

Composer 安装命令:

composer require khalin/nova-link-field

包简介

A Laravel Nova Link field.

README 文档

README

License: MIT

Index View

Edit View

Installation

  1. composer require khalin/nova-link-field

Usage

  1. Include the dependency use Khalin\Nova\Field\Link;
  2. Add to the Fields array
Link::make('Charge Id', 'stripe_id'),

Advanced usage

Edit link href:

For this needs you can use url() function (accept Callable or string)

Example:

Link::make('Charge Id', 'stripe_id')
                ->url(function () {
                    return "https://dashboard.stripe.com/payments/{$this->stripe_id}";
                })

Set custom link text

For this needs you can use text() function (accept Callable or text)

Example:

Link::make('Charge Id', 'stripe_id')
                ->url(function () {
                    return "https://dashboard.stripe.com/payments/{$this->stripe_id}";
                })
                ->text("Go To Stripe")

Show icon instead of text

Replaces text with an icon on the index view. For this needs you can use icon() function

Example:

Link::make('Charge Id', 'stripe_id')
                ->url(function () {
                    return "https://dashboard.stripe.com/payments/{$this->stripe_id}";
                })
                ->text("Go To Stripe")
                ->icon()

Open link in blank window

For this needs you can use blank() function.

Example:

Link::make('Charge Id', 'stripe_id')
                ->url(function () {
                    return "https://dashboard.stripe.com/payments/{$this->stripe_id}";
                })
                ->blank()

Add additional classes to <a>

For this needs you can use classes() function (accept Callable or text).

Example:

Link::make('Charge Id', 'stripe_id')
                ->classes(function () {
                    return null === $this->charge_id ? 'charge__pending' : "charge_successfull";
                })

TODO

  • Cover field with tests

统计信息

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

GitHub 信息

  • Stars: 31
  • Watchers: 1
  • Forks: 6
  • 开发语言: Vue

其他信息

  • 授权协议: MIT
  • 更新时间: 未知

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固