PHPackages                             curlymoustache/sanction - 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. curlymoustache/sanction

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

curlymoustache/sanction
=======================

A PHP Permissions and role-based access control library, with plenty of flexibility and ability to extend and replace components.

v0.5(12y ago)728MITPHPPHP &gt;=5.4.0

Since Oct 27Pushed 12y ago1 watchersCompare

[ Source](https://github.com/danmatthews/sanction-php)[ Packagist](https://packagist.org/packages/curlymoustache/sanction)[ RSS](/packages/curlymoustache-sanction/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (2)Versions (3)Used By (0)

Sanction.
=========

[](#sanction)

**Note: Requires PHP5.4+**

Yep, another access control package for PHP, including some neat integration with [Laravel 4](http://laravel.com).

Declare a list of roles, the permissions they can access, and any other roles they inherit from as a config array (or file, or whatever you like!), then let `Sanction` do the rest.

Attaching roles to users is your job, this merely sets what they *can* do once they're attached - But we provide some helpers for Laravel (and hopefully some more generic stuff soon too).

Basic Usage
-----------

[](#basic-usage)

Let's say we have a user management app, with two roles defined, *standard\_user*, and *admin*. Our *standard\_user* can create and update users, but our *administrator\_user* can also delete users, as well as creating and updating them.

```
