完成学校与教师
This commit is contained in:
1 parent
25cc4897eb
commit
0dbee995fc
41 files changed
+2118
-37
No files matched your search
@@ -193,11 +193,12 @@ class Index extends Base
|
||||
$validate = new \app\admin\validate\Admin;
|
||||
|
||||
// 获取表单数据
|
||||
$list = request()->only(['xingming','username','sex','shengri','phone','beizhu'],'put');
|
||||
$list = request()->only(['xingming','username','sex','shengri','phone','beizhu','group_id'],'put');
|
||||
|
||||
// 验证表单数据
|
||||
$result = $validate->check($list);
|
||||
$msg = $validate->getError();
|
||||
unset($list['group_id']);
|
||||
|
||||
// 如果验证不通过则停止保存
|
||||
if(!$result){
|
||||
@@ -205,7 +206,8 @@ class Index extends Base
|
||||
}
|
||||
|
||||
// 更新管理员信息
|
||||
$data = AD::where('id',$id)->update($list);
|
||||
$admin = new AD();
|
||||
$data = $admin->save($list,['id'=>$id]);
|
||||
|
||||
// 更新管理员角色
|
||||
$group_id = request()->put('group_id');
|
||||
|
||||
Reference in new issue
Block a user