PHPackages                             uteq/laravel-move-permissions - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. uteq/laravel-move-permissions

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

uteq/laravel-move-permissions
=============================

Permissions for Laravel Move Admin Panel

v0.3.0(4y ago)074[2 PRs](https://github.com/uteq/laravel-move-permissions/pulls)MITPHPPHP ^8.0

Since Jan 5Pushed 2y ago2 watchersCompare

[ Source](https://github.com/uteq/laravel-move-permissions)[ Packagist](https://packagist.org/packages/uteq/laravel-move-permissions)[ Docs](https://github.com/uteq/laravel-move-permissions)[ GitHub Sponsors](https://github.com/uteq)[ RSS](/packages/uteq-laravel-move-permissions/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (1)Dependencies (11)Versions (5)Used By (0)

Permissions for Laravel Move Admin Panel
========================================

[](#permissions-for-laravel-move-admin-panel)

[![Latest Version on Packagist](https://camo.githubusercontent.com/37d07c018cd6b56f0341a8db500d5c331ec90e8a6ab6d329ebecb5093a94c586/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f757465712f6c61726176656c2d6d6f76652d7065726d697373696f6e732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/uteq/laravel-move-permissions)[![GitHub Tests Action Status](https://camo.githubusercontent.com/5a883012a2f369c3b6260a4f8fd9efab27e2b8fa1ad8c58d9d6af245102e3273/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f757465712f6c61726176656c2d6d6f76652d7065726d697373696f6e732f72756e2d74657374733f6c6162656c3d7465737473)](https://github.com/uteq/laravel-move-permissions/actions?query=workflow%3Arun-tests+branch%3Amaster)[![Total Downloads](https://camo.githubusercontent.com/a09a612443ab21116f261cfa7fa7c28da653be67df72823cc27f5530126e9987/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f757465712f6c61726176656c2d6d6f76652d7065726d697373696f6e732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/uteq/laravel-move-permissions)

**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](https://spatie.be/docs/laravel-permission/). This package was heavily inspired by this package , by [eminiarts](https://github.com/eminiarts).

Support us
----------

[](#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
------------

[](#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
-----

[](#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

[](#add-the-role-resource-to-your-move-folder)

```
