public function updatePermissions(Request $request, Role $role)
    {
        $this->authorize('manage_permissions', Role::class);
        $permissions = Permission::all();

        foreach ($permissions as $permission) {
            if (array_key_exists($permission->id, $request->all())) {
                $role->addPermission($permission);
            } else {
                $role->deletePermission($permission);
            }
        }

        return redirect()->route('laralum::roles.index')->with('success', __('laralum_roles::general.role_permissions_updated', ['id' => $role->id]));
    }