Download the PHP package machuga/authority-l4 without Composer

On this page you can find all versions of the php package machuga/authority-l4. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package authority-l4

THIS REPO IS DEPRECATED

I no longer use PHP enough to be able to work on Authority so it's time to EOL it. If you're interested in taking it over, ping me in an issue with "@machuga".

Authority-L4

A simple and flexible authorization system for Laravel 4

Installation via Composer

Add Authority to your composer.json file to require Authority

require : {
    "laravel/framework": "~4",
    "machuga/authority-l4" : "dev-master"
}

Now update Composer

composer update

The last required step is to add the service provider to app/config/app.php

Congratulations, you have successfully installed Authority. However, we have also included some other configuration options for your convenience.

Additional (optional) Configuration Options

Add the alias (facade) to your Laravel app config file.

This will allow you to access the Authority class through the static interface you are used to with Laravel components.

Publish the Authority default configuration file

This will place a copy of the configuration file at app/config/packages/machuga/authority-l4. The config file includes an 'initialize' function, which is a great place to setup your rules and aliases.

Create Roles and Permissions Tables

We have provided a basic table structure to get you started in creating your roles and permissions.

Run the Authority migrations

This will create the following tables

To utilize these tables, you can add the following methods to your User model. You will also need to create Role and Permission Model stubs.

Lastly, in your Authority config file which you copied over in the previous configuration step. You can add some rules:

General Usage

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.


All versions of authority-l4 with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.0
illuminate/support Version ~4
machuga/authority Version 2.1.*
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package machuga/authority-l4 contains the following files

Loading the files please wait ....