think.studio/nova-html-field
最新稳定版本:2.3.1
Composer 安装命令:
composer require think.studio/nova-html-field
包简介
HTML Laravel Nova field. (alternative of text field)
关键字:
README 文档
README
| Nova | Package |
|---|---|
| V1 | V1 |
| V4 | V2 |
Usage Warning!
If you want use html only on Index (Preview) or Details screen, then please use default laravel nova functionality:
\Laravel\Nova\Fields\Text::make('Preview', function () { return view('custom-link', [ 'url' => url('/preview'), 'id' => $this->id, ])->render(); })->asHtml();
The package was created to add such a feature also to the Update and Create screens. (By default, Create screen is disabled.)
Installation
You can install the package via composer:
composer require think.studio/nova-html-field
Usage
Html::make('Preview', function () { return view('nova-html-field::blocks.link', [ 'href' => url('/preview'), 'linkText' => 'Preview', 'target' => '_blank', ])->render(); })->clickable(); Html::make('Preview', function () { return view('nova-html-field::blocks.links', [ 'links' => [ [ 'href' => url('/preview'), 'title' => 'title', 'target' => '_blank', ], [ 'href' => url('/preview'), 'title' => 'title', 'target' => '_blank', ], ] ])->render(); }) ->clickable() ->showOnIndex() ->showOnPreview(),
Html::make('Docs', fn() => view('nova-html-field::blocks.link', [ 'href' => $this->resource->pdfUrl(), ])->render() ) ->showOnCreating() ->clickable() ->help('Link to documentation');
Credits
统计信息
- 总下载量: 3.12k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 3
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-07-08