diff --git a/README.md b/README.md index 99d7d011..b91543c5 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,7 @@ To install, configure and learn how to use Laratrust please go to the [Documenta - Multiple permissions can be attached to roles. - Roles and permissions verification. - Roles and permissions caching. +- Events when roles and permissions are attached, detached or synced. - Multiple roles and permissions can be attached to users within teams. - Objects ownership verification. - Multiple guards for the middlewares. diff --git a/docs/usage/concepts.rst b/docs/usage/concepts.rst index 4355a760..828564dc 100644 --- a/docs/usage/concepts.rst +++ b/docs/usage/concepts.rst @@ -56,9 +56,6 @@ Assignment $owner->syncPermissions([$createPost, $editUser]); // parameter can be a Permission object, array or id // equivalent to $owner->permissions()->sync([$createPost->id, $editUser->id]); - $owner->syncPermissionsWithoutDetaching([$createPost, $editUser]); // parameter can be a Permission object, array or id - // equivalent to $owner->permissions()->syncWithoutDetaching([$createPost->id, $editUser->id]); - Removal ^^^^^^^ @@ -123,6 +120,9 @@ Assignment $user->syncPermissions([$editUser->id, $createPost->id]); // equivalent to $user->permissions()->sync([$editUser->id, createPost->id]); + $user->syncPermissionsWithoutDetaching([$editUser, $createPost]); // parameter can be a Permission object, array or id + // equivalent to $user->permissions()->syncWithoutDetaching([$createPost->id, $editUser->id]); + Removal ^^^^^^^ diff --git a/docs/usage/index.rst b/docs/usage/index.rst index 8de683a7..213ae7f2 100644 --- a/docs/usage/index.rst +++ b/docs/usage/index.rst @@ -5,6 +5,6 @@ Usage concepts events + middleware soft_deleting blade_templates - middleware