PHPackages                             defrostedtuna/alnus - 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. defrostedtuna/alnus

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

defrostedtuna/alnus
===================

1.03(8y ago)037MITPHPPHP &gt;=5.6.4

Since Jan 18Pushed 7y ago1 watchersCompare

[ Source](https://github.com/DefrostedTuna/alnus)[ Packagist](https://packagist.org/packages/defrostedtuna/alnus)[ RSS](/packages/defrostedtuna-alnus/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (1)Versions (5)Used By (0)

Alnus
=====

[](#alnus)

Alnus is a library to add roles and permissions to a Laravel project and is built to work alongside Laravel's Gate system. Alnus hill is a reference to something called, wait for it... [Gate](https://en.wikipedia.org/wiki/Gate_(novel_series)).

### Quick Installation

[](#quick-installation)

Composer is the best way to install Alnus.

```
composer require defrostedtuna/alnus

```

Otherwise you could just place it in your `composer.json` file.

```
"require": {
    "defrostedtuna/alnus": "^1.0"
},
```

### Service Provider

[](#service-provider)

After installing, you must place the service provider into `config/app.php`

```
'providers' => [

    // Lots of providers here

    DefrostedTuna\Alnus\AlnusServiceProvider::class,

    // Some other jargon afterwards

],
```

### Migrations

[](#migrations)

Migrations have been made to incorporate this into an application out of the box. Simply run `php artisan migrate` to have the migration tables created.

**Note:** By default, Alnus is set to migrate a **uuid** field as a foreign key in reference to the *users* table.

Personally, I use the package `webpatser/laravel-uuid` for this matter. [Here is a very good article on implementing uuids into a Laravel project](https://medium.com/@steveazz/setting-up-uuids-in-laravel-5-552412db2088#.ytme0xw00).

### Trait

[](#trait)

To finish setup, attach the `RolesAndPermissions` trait onto your user model.

```
