composer require i74ifa/role-craft| Version | Laravel | Spatie Permission | PHP |
|---|---|---|---|
| v2.x | 12.0+ / 13.0+ | 7.0+ | 8.4+ |
| v1.x | 10.0+ / 11.0+ | 6.x | 8.2+ |
publish config
php artisan vendor:publish --tag=role-craft-configphp artisan role-craft:generatethis command will be generate all permissions and role-craft.default_role will be created
if you want to change default role name, you can change it in config/role-craft.php after publish config
php artisan role-craft:sync manager --allthis will be sync all permissions to manager role if it exists
if not exists you want to use --create option
php artisan role-craft:sync manager --createif you want to sync some role from models use --models option
php artisan role-craft:sync manager --models=User --models=Post
# OR Custom Directory
php artisan role-craft:sync manager --models=App\Models\Directory\UserGenerate role if not exists
php artisan role-craft:sync manager --createThis package is released under the MIT license.