修改角色管理

This commit is contained in:
wuyanwen 2020-01-14 08:22:31 +08:00
parent f63706eb0a
commit 7e41702de8
2 changed files with 11 additions and 1 deletions

View File

@ -97,7 +97,7 @@ class Role extends CatchController
} }
if (!empty($request->param('departments'))) { if (!empty($request->param('departments'))) {
$role->detachDepartments(); $role->detachDepartments();
$role->attach($request->param('departments')); $role->attachDepartments($request->param('departments'));
} }
return CatchResponse::success(); return CatchResponse::success();
} }

View File

@ -0,0 +1,10 @@
<?php
/**
* @filename HasPermissionsTrait.php
* @createdAt 2020/1/14
* @project https://github.com/yanwenwu/catch-admin
* @document http://doc.catchadmin.com
* @author JaguarJack <njphper@gmail.com>
* @copyright By CatchAdmin
* @license https://github.com/yanwenwu/catch-admin/blob/master/LICENSE.txt
*/