Download the PHP package uzzal/acl without Composer

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

ACL

Upgraded to support Laravel 8 and latest versions

Dynamically configurable access control for Laravel. One user can have multiple roles.

Install

Configuration

In your laravel config/app.php under providers add

Publish

This command will publish view files inside views/vendor/acl, seed files inside the databases/seed and a config file config/acl.php.

Database seed

At your DatabaseSeeder.php under database/seeds add the following lines

NOTE: If you see any kind of class not found type error try running composer dump-autoload

Artisan command

This library comes with an artisan command acl:resource to automatically create all the resources (controller@action) available in your project under app/Http/Controllers directory. To activate this command you need to add these following lines to your app/Console/Kernel.php file.

Modify the User model

In your User model add the following trait

[Attribute]

Acl library now has two attribute support #Resource, and #Authorize to be used with controller action

NOTE: by default developer role has the highest permission level, and it doesn't need to be mentioned in the #Authorize attribute. If you remove the #Authorize attribute it won't delete the permissions from the database, but if you change the role list in the annotation then it will update the databased accordingly.

Middleware

This ACL library comes with two middleware as shown below. AuthenticateWithAcl is the middleware you need. The other ResourceMaker middle ware is just a helper to create resource dynamically if it doesn't exists in the first place and assign permission for it to the developer role.

In your kernal.php file add this lines

In your route/web.php file add this lines

IMPORTANT: resource.maker must have to be placed before auth.acl. In production you can remove resource.maker once you have all the resource generated.

Role & Resource UI

To access role visit YOUR-HOST/role url

To access resource UI visit YOUR-HOST/resource url

Access check

There are several ways to check for access

By route name here home.index is the name of the route.

By controller's action name

Checking for controller level access

Suppose you have two controllers named HomeController and ProfileController now you want to check if the user has any access to both of the controller then use the following code

Checking access by Role name


All versions of acl with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0
laravel/framework Version >=8.75
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 uzzal/acl contains the following files

Loading the files please wait ....