Skip to content

v1.0.0-beta.2

Pre-release
Pre-release
Compare
Choose a tag to compare
@JosephSilber JosephSilber released this 25 Jan 15:32
· 358 commits to master since this release

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() and unforbid().

  • 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.