mirror of https://gitee.com/karson/fastadmin.git
对于一些不想在列表中展示的字段,增加过滤入口
parent
3fd25c3de0
commit
d97c80ce8f
|
|
@ -60,6 +60,7 @@ trait Backend
|
||||||
$list = $this->model
|
$list = $this->model
|
||||||
->where($where)
|
->where($where)
|
||||||
->order($sort, $order)
|
->order($sort, $order)
|
||||||
|
->field($this->listDisplayFields)
|
||||||
->paginate($limit);
|
->paginate($limit);
|
||||||
$result = ['total' => $list->total(), 'rows' => $list->items()];
|
$result = ['total' => $list->total(), 'rows' => $list->items()];
|
||||||
return json($result);
|
return json($result);
|
||||||
|
|
|
||||||
|
|
@ -92,6 +92,12 @@ class Backend extends Controller
|
||||||
*/
|
*/
|
||||||
protected $multiFields = 'status';
|
protected $multiFields = 'status';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 列表默认显示字段
|
||||||
|
* @var array|string
|
||||||
|
*/
|
||||||
|
protected $listDisplayFields = '*';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Selectpage可显示的字段
|
* Selectpage可显示的字段
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue