think.studio/nova-has-many-on-index
最新稳定版本:1.1.0
Composer 安装命令:
composer require think.studio/nova-has-many-on-index
包简介
A Laravel Nova field used to display a 'Has Many' relationship on the index screen.
README 文档
README
A Laravel Nova field used to display a 'Has Many' relationship on the index screen.
Very focused package for display quantity and list. May slow down the display of the index page
Installation
composer require think.studio/nova-has-many-on-index
Usage
\NovaHasManyIndex\NovaHasManyOnIndex::make(trans('cols-computed.subscriptions'), 'subscriptions_count') ->displayUsing(function ($val, $model) { return [ 'val' => $val, 'items' => $model->subscriptions->map(function ($item) { return [ 'url' => route('nova.pages.detail', [ 'resource' => Contact::uriKey(), 'resourceId' => $item->getKey(), ]), 'title' => "({$item->getKey()}) $item->name", 'icon' => [ 'type' => 'trash', 'solid' => true, 'class' => 'text-red-500', ], ]; })->all(), ]; }) ->sortable(),
Credits
统计信息
- 总下载量: 264
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-09-03
