packagist spatie/laravel-permission 3.9.0

latest releases: dev-main, 6.9.0, 6.8.0...
4 years ago

Added Wildcard Permissions feature based on the default wildcard permission implementation of Apache Shiro.

The feature is off by default, but you can enable wildcard permissions in the config file:

// config/permission.php
'enable_wildcard_permission' => true,

Wildcard permissions offers a flexible representation for a variety of permission schemes.

Some examples:

// user can only do the actions create, update and view on both resources posts and users
$user->givePermissionTo('posts,users.create,update,view');

// user can do the actions create, update, view on any available resource
$user->givePermissionTo('*.create,update,view');

// user can do any action on posts with ids 1, 4 and 6 
$user->givePermissionTo('posts.*.1,4,6');

See documentation for more complete details.

Thanks @stefanriehl

Don't miss a new laravel-permission release

NewReleases is sending notifications on new releases.