uteq / laravel-move-permissions
Permissions for Laravel Move Admin Panel
Fund package maintenance!
uteq
Requires
- php: ^8.0
- illuminate/contracts: ^8.0
- spatie/laravel-package-tools: ^1.9.2
- spatie/laravel-permission: ^3.17
Requires (Dev)
- nunomaduro/collision: ^5.10
- nunomaduro/larastan: ^1.0
- orchestra/testbench: ^6.22
- pestphp/pest: ^1.21
- pestphp/pest-plugin-laravel: ^1.1
- phpunit/phpunit: ^9.5
- spatie/laravel-ray: ^1.26
- uteq/laravel-move: dev-master
This package is auto-updated.
Last update: 2024-10-09 15:14:02 UTC
README
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.
Support us
The best way to support us is by adding a test suite to this project and help build, give feedback and extend it :)
Installation
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"
Usage
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.
Add the Role Resource to your Move folder
<?php namespace App\Admin\Users; class Role extends \Uteq\MovePermissions\Resources\Role { }
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.