PHPackages                             unstoppablecarl/arbiter - 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. unstoppablecarl/arbiter

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

unstoppablecarl/arbiter
=======================

Manage Laravel User abilities that target Users

0.2.3(7y ago)311MITPHPPHP &gt;=5.6.4

Since Jul 24Pushed 10mo ago1 watchersCompare

[ Source](https://github.com/unstoppablecarl/arbiter)[ Packagist](https://packagist.org/packages/unstoppablecarl/arbiter)[ Docs](https://github.com/unstoppablecarl/arbiter)[ RSS](/packages/unstoppablecarl-arbiter/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (9)Dependencies (6)Versions (10)Used By (0)

Arbiter
=======

[](#arbiter)

Manage Laravel User abilities that target Users.

[![Source Code](https://camo.githubusercontent.com/2ba6d8b811fde22c84d6814f6493a784ffb94fa11e74e550189e5ac076ee3c34/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f736f757263652d756e73746f707061626c656361726c2f617262697465722d626c75652e737667)](https://github.com/unstoppablecarl/arbiter)[![Latest Version](https://camo.githubusercontent.com/c0454e48c2f2943df68edec9750c46298ad40ad3f7c32528804c32289bc3798f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f756e73746f707061626c656361726c2f617262697465722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/unstoppablecarl/arbiter)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](https://github.com/unstoppablecarl/arbiter/blob/master/LICENSE)[![Build Status](https://camo.githubusercontent.com/a171218d1682d359f3a06aef560aba32397692590a9616fd37625353df3d62b9/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f756e73746f707061626c656361726c2f617262697465722f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/unstoppablecarl/arbiter)[![Coverage Status](https://camo.githubusercontent.com/2c3b0b566ff22f5d038bd3d59e412f5e8b9ca5517f877decf6d9b89d86114f3c/68747470733a2f2f696d672e736869656c64732e696f2f636f766572616c6c732f756e73746f707061626c656361726c2f617262697465722f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://coveralls.io/r/unstoppablecarl/arbiter?branch=master)[![Total Downloads](https://camo.githubusercontent.com/9d6203ae41f9a79b77c0ddb3f721222e1dcd2172a3915ad82b100631ce4f7d1c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f756e73746f707061626c656361726c2f617262697465722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/unstoppablecarl/arbiter)

About
-----

[](#about)

Determining a way to authorize what actions can be performed by one User on another may seem like a simple problem at first. Most Role based permission modules are designed to allow multiple roles per user. This is an extremely powerful and flexible design pattern but creates a hard to define authorization case: When User-A can *update* users with Role-1, and User-B has Role-1 and Role-2, how should your application determine if User-A *update* User-B?

Arbiter provides a solution to this problem without getting in the way of an existing or separate multi-role based authorization system.

Requirements
------------

[](#requirements)

- PHP &gt;= 5.5.9
- Laravel &gt;= 5.2

Installation
------------

[](#installation)

The preferred method of installation is via [Packagist](https://packagist.org/packages/unstoppablecarl/arbiter) and [Composer](http://getcomposer.org/). Run the following command to install the package and add it as a requirement to your project's `composer.json`:

```
composer require unstoppablecarl/arbiter
```

Overview
--------

[](#overview)

Each User has exactly one **Primary Role**. Primary Roles are used to determine what actions a user can perform on other users and vice-versa. Each Primary Role is identified with a unique name string.

The `UserWithPrimaryRole` interface is implemented on the User model.

```
