修改条件筛选

This commit is contained in:
小松树 committed 2019-05-08 14:34:52 +08:00
1 parent 8094365fb0
commit 588b0ce6c9
38 files changed
+722 -1570

No files matched your search

+1 -1
View File
@@ -15,7 +15,7 @@ class Admin extends Base
// 查询数据
$data = $this
->order([$src['field'] =>$src['order']])
->order([$src['field'] =>$src['type']])
->where('id','>',2)
->when(strlen($searchval)>0,function($query) use($searchval){
$query->where('xingming|username','like','%'.$searchval.'%');