composer require huo-zi/laravel-admin-ext-displayer
$grid->column('field_name', 'field_label')->ellipsis('100px');
可以支持传入增量值字段:
$grid->column('field_name', 'field_label')->increase('field_name2');
或使用闭包计算增量:
$grid->column('field_name', 'field_label')->increase(function($row){
return $this->field_name - $this->field_name2;
});
$filter->column('field_label')->multiline('field_name1','field_name2','relation.field_name3');
第一个参数ProgressRefresh::class是一个实现了Renderable
的类,需要实现render($id = null)
并返回对应记录的进度
第二个参数为刷新的频率,单位秒
$grid->column('field_name', 'field_label')->progressBar()->progressRefresh(ProgressRefresh::class, 3);
$filter->column('field_name', 'field_label')->unit('¥');
如果单位需要显示在右边:
$filter->column('field_name', 'field_label')->unit('%', false);
Licensed under The MIT License (MIT).