v1.0.0-beta.3
Pre-release
Pre-release
JosephSilber
released this
03 Aug 18:14
·
338 commits
to master
since this release
New
-
Support Laravel 5.4.31, which broke Bouncer.
-
Greatly enhanced granting multiple roles/abilities at once:
// Assign multiple roles: Bouncer::assign(['admin', 'editor'])->to($user); // Allow multiple abilities: Bouncer::allow($user)->to(['access-dashboard', 'ban-users']); // ...also works with model abilities: Bouncer::allow($user)->to(['edit', 'delete'], Post::class); Bouncer::allow($user)->to(['edit', 'delete'], $post); // ...and even with multiple models: Bouncer::allow($user)->to('delete', [Post::class, Category::class]); Bouncer::allow($user)->to(['edit', 'delete'], [Post::class, Category::class]); // ...and can also take an associative array: Bouncer::allow($user)->to([ 'create' => Post::class, 'view' => User::class, 'edit' => $user, ]);
Breaking Changes
- Removed the
isNot
method from theHasRoles
trait. UseisNotA
andisNotAn
instead.