Package Data | |
---|---|
Maintainer Username: | fahmiardi |
Maintainer Contact: | f4hem.net@gmail.com (Fahmi Ardi) |
Package Create Date: | 2016-12-18 |
Package Last Update: | 2016-12-18 |
Home Page: | |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-11-15 15:25:59 |
Package Statistics | |
---|---|
Total Downloads: | 45 |
Monthly Downloads: | 0 |
Daily Downloads: | 0 |
Total Stars: | 1 |
Total Watchers: | 1 |
Total Forks: | 0 |
Total Open Issues: | 1 |
This is out of the box package managing permission via console command for Spatie Laravel Permission
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
###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