pdewit/nova-external-url
最新稳定版本:1.0.3
Composer 安装命令:
composer require pdewit/nova-external-url
包简介
An external URL Laravel Nova field.
README 文档
README
Adds the ability to show external URLs in the detail and index views of resources. It uses the resolving feature from Nova to generate links.
It will show up in the detail view like this:
And in the index view like this:
Installation and usage
You can require this package using composer:
composer require pdewit/nova-external-url
You can add the field with a resolver as follows:
use Pdewit\ExternalUrl\ExternalUrl; ExternalUrl::make('Google Link', function () { return 'https://www.google.com/search?q=' . $this->name; }),
Customising the displayed text
You can customise the displayed text using the linkText function like so:
use Pdewit\ExternalUrl\ExternalUrl; ExternalUrl::make('Google Link', function () { return 'https://www.google.com/search?q=' . $this->name; })->linkText($this->name),
The label below the link normally shows the URL, but it can be overridden:
use Pdewit\ExternalUrl\ExternalUrl; ExternalUrl::make('Google Link', function () { return 'https://www.google.com/search?q=' . $this->name; })->labelText('View search results on Google'),
统计信息
- 总下载量: 353.88k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 30
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-08-23

