fahmiardi / laravel-permission-command
Console commands for Laravel Permission
0.1
2016-12-18 21:54 UTC
Requires
- illuminate/console: ~5.1.0|~5.2.0|~5.3.0
- spatie/laravel-permission: ~1.5.2
This package is not auto-updated.
Last update: 2024-11-09 21:06:49 UTC
README
This is out of the box package managing permission via console command for Spatie Laravel Permission
Install
composer require fahmiardi/laravel-permission-command
Register service provider by adding to your config/app.php
:
... Fahmiardi\Permissions\Commands\PermissionCommandServiceProvider::class,
Once installed you can do stuff like this:
php artisan list
You must see:
permission permission:assign-role Assign role(s) to user permission:create-permission Create permission permission:create-role Create role permission:give-permission Give permission(s) to user or role
Usage
###Create Permission
php artisan permission:create-permission
###Create Role
php artisan permission:create-role
###Assign Role to User
php artisan permission:assign-role
###Give permission to User and Role type
php artisan permission:give-permission #type will be asked
php artisan permission:give-permission --user
php artisan permission:give-permission --role