From 98b2d7d31b622bde7bafc0bebe0b0f9f54a4711b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9D=92=E8=8A=92=E7=A7=91=E6=8A=80?= <67047984+qingmang@users.noreply.github.com> Date: Mon, 13 Jul 2020 19:00:53 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=BE=E7=BD=AEdepartments=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E7=9A=84=E9=BB=98=E8=AE=A4=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 只有自定义数据才存在departments --- catch/permissions/controller/Role.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/catch/permissions/controller/Role.php b/catch/permissions/controller/Role.php index 089d229..7c38ecd 100644 --- a/catch/permissions/controller/Role.php +++ b/catch/permissions/controller/Role.php @@ -96,7 +96,7 @@ class Role extends CatchController // 更新department $hasDepartmentIds = $role->getDepartments()->column('id'); - $departmentIds = $request->param('departments'); + $departmentIds = $request->param('departments',[]); // 已存在部门 IDS $existedDepartmentIds = [];