fahmiardi/laravel-permission-command

Console commands for Laravel Permission

0.1 2016-12-18 21:54 UTC

This package is not auto-updated.

Last update: 2024-12-21 21:42:07 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