Download the PHP package authority-php/authority-laravel without Composer

On this page you can find all versions of the php package authority-php/authority-laravel. 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-laravel

Authority-Laravel

A simple and flexible authorization system for Laravel 5

Installation via Composer

Add Authority to your composer.json file to require Authority

require : {
  "laravel/framework": "~5.0.16",
  "authority-php/authority-laravel": "dev-master"
}

Now update Composer

composer update

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

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

For Laravel 4 supports, see Authority-Laravel 2.3 branch

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 config/authority.php. 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.

Publish them to your migrations directory or copy them directly.

Run the 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-laravel with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4.0
illuminate/support Version 5.0.x|5.1.x|5.2.x|5.3.x|5.4.x
authority-php/authority Version ~2.2.2
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 authority-php/authority-laravel contains the following files

Loading the files please wait ....