General Usage

// If you added the alias to `config/app.php` then you can access Authority, from any Controller, View, or anywhere else in your Laravel app like so:if (Authority::can('create', 'User')) {User::create(array('username'=>'someuser@test.com' )); }// If you just chose to use the service provider, you can use the IoC container to resolve your instance$authority=App::make('authority');

Interface

There are 5 basic functions that you need to be aware of to utilize Authority.

Converting to this library, where you previously had been using the IoC container to resolve an instance.

The service provider will merely create a new instance of Authority, and pass in the currently logged in user to the constructor. This should be basically the same process that you were doing in your IoC registry. This means that any code you have used in the past should still work just fine! However it is recommended that you move your rule definitions into the provided configuration file.