创建角色js

This commit is contained in:
小松树 committed 2019-04-09 16:45:38 +08:00
1 parent 9b3511851c
commit bd00d57337
13 files changed
+508 -830

No files matched your search

+16 -1
View File
@@ -7,5 +7,20 @@ use app\common\model\Base;
class AuthGroup extends Base
{
// 状态获取器
// 查询所有角色
public function search($src)
{
// 整理变量
$searchval = $src['searchval'];
// 查询数据
$data = $this
->order([$src['field'] =>$src['order']])
->when(strlen($searchval)>0,function($query) use($searchval){
$query->where('title','like','%'.$searchval.'%');
})
->select();
return $data;
}
}