This package is still in development and does not have a test suite.
Permissions for Laravel Move enables you to create grouped permissions and is a wrapper for Spaties Laravel Permission. This package was heavily inspired by this package https://github.com/eminiarts/nova-permissions, by eminiarts.
The best way to support us is by adding a test suite to this project and help build, give feedback and extend it :)
You can install the package via composer:
composer require uteq/laravel-move-permissions
You can publish and run the migrations with:
php artisan vendor:publish --provider="Uteq\MovePermissions\PermissionsServiceProvider" --tag="migrations"
php artisan migrate
You can publish the seeders with:
php artisan vendor:publish --provider="Uteq\MovePermissions\PermissionsServiceProvider" --tag="seeders"
You can publish the config file with:
php artisan vendor:publish --provider="Uteq\MovePermissions\PermissionsServiceProvider" --tag="config"
Add one of the following (or all) to your User Resource:
use Uteq\MovePermissions\Fields\Role;
use Uteq\MovePermissions\Fields\Roles;
use Uteq\MovePermissions\Fields\Permissions;
public function fields()
{
// Add a single role to your user
Role::make('Rol', 'role'),
// Add more than one role to your user
Roles::make('Roles', 'roles'),
// Add permissions to your user
Permissions::make('Permissions', 'permissions'),
}
You are free to combine the Role/Roles and Permissions. Don't use the Role and Roles Field on the same Resource. Make sure you add a Policy for the User to make Permissions policy work.
<?php
namespace App\Admin\Users;
class Role extends \Uteq\MovePermissions\Resources\Role
{
}
composer test
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
Please review our security policy on how to report security vulnerabilities.
The MIT License (MIT). Please see License File for more information.