设置departments获取的默认值

只有自定义数据才存在departments
This commit is contained in:
青芒科技 2020-07-13 19:00:53 +08:00 committed by GitHub
parent 5b43786432
commit 98b2d7d31b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -96,7 +96,7 @@ class Role extends CatchController
// 更新department
$hasDepartmentIds = $role->getDepartments()->column('id');
$departmentIds = $request->param('departments');
$departmentIds = $request->param('departments',[]);
// 已存在部门 IDS
$existedDepartmentIds = [];