xingchuangyang/dcat-admin-sortable
最新稳定版本:v1.0.0
Composer 安装命令:
composer require xingchuangyang/dcat-admin-sortable
包简介
dcat-admin 表格排序插件
README 文档
README
截图
使用
引入 composer 包
composer require xingchuangyang/dcat-admin-sortable
修改 Model
引入 SortableTrait,并实现 Sortable 接口
namespace App\Models; use Illuminate\Database\Eloquent\Model; use Spatie\EloquentSortable\Sortable; use Spatie\EloquentSortable\SortableTrait; class Product extends Model implements Sortable { use SortableTrait; public $sortable = [ 'order_column_name' => 'sort', // 排序字段 'sort_when_creating' => true, // 新增是否自增,默认自增 ]; }
在 Controller 中使用
$grid->column('sort', '排序')->action(\Xcy\DcatAdminSortable\Actions\SortableColumnRow::gen(\App\Models\Product::class));
统计信息
- 总下载量: 1.24k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 6
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-11-07