New
-
Support for Laravel 5.4.
-
Added the
toEver
method to forbid a given ability on all models:Bouncer::forbid('editor')->toEver('delete');
-
Fluent API for the
HasAbilities
trait:$user->allow()->everything(); $user->allow()->toAlways('view'); $user->allow()->toManage(Post::class); $user->allow()->toOwn(Profile::class); $user->allow()->toOwnEverything();
Also works for
disallow()
,forbid()
andunforbid()
. -
Support table prefixes.
Bouncer will now honor any table prefixes that you've set up in Laravel's config.
Breaking Changes
- The namespace for most traits has been changed. If you're using any trait other than
HasRolesAndAbilities
, you'll have to update its namespace import.