PHPackages                             emptynick/voyager-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. emptynick/voyager-permissions

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

emptynick/voyager-permissions
=============================

Permission system for Voyager II using spatie/laravel-permission

v1.3(4y ago)037[2 PRs](https://github.com/emptynick/voyager-permissions/pulls)MITVue

Since Jun 1Pushed 2y ago1 watchersCompare

[ Source](https://github.com/emptynick/voyager-permissions)[ Packagist](https://packagist.org/packages/emptynick/voyager-permissions)[ RSS](/packages/emptynick-voyager-permissions/feed)WikiDiscussions main Synced today

READMEChangelog (4)Dependencies (2)Versions (7)Used By (0)

spatie/permission plugin for Voyager II
=======================================

[](#spatiepermission-plugin-for-voyager-ii)

This plugin for Voyager II implements spaties [laravel-permission](https://github.com/spatie/laravel-permission) to authorize actions and users.

Getting started
---------------

[](#getting-started)

### Require the package

[](#require-the-package)

First, require the plugin: `composer require emptynick/voyager-permissions`.

### Run the installer

[](#run-the-installer)

Run the installer by calling `php artisan permissions:install`.

#### Publishing migrations and config file

[](#publishing-migrations-and-config-file)

First the installer will publish a configuration file and migrations.
After that you will be asked if you want to migrate now.
If you want to change the published migrations select `No` and run the command again after you finished editing.

#### Add the HasRole Trait to your user model

[](#add-the-hasrole-trait-to-your-user-model)

The the installer will ask you to open your user model and add the trait `Emptynick\Permissions\Traits\HasRoles`:

```
