Download the PHP package weirdo/dynamic-acl without Composer

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

Dynamic ACL

Dynamic ACL is a package that handles Access Control Level on your Laravel Application. It's fast to run and simple to use. Install and enjoy ;)

Features

Installation

Prerequisite:

Publish config file

Migrate roles table

Don't worry about relationships; We handle them for you.

Run make:admin command

This command makes your first admin a super admin with a full-access level.

Usage

Just run your application and visit locahost:8000/admin/roles. You'll see a list of your roles. You can create a new one, edit or delete them.

Configuration

After publishing the vendor, you can change the configuration in the config/dynamicACL.php file.

It has the following options:

How to use the ACL?

Just add dynamicAcl middleware to your routes.

now you'll see list of the routes with dynamicAcl middleware on localhost:8000/admin/roles/create.

also, this middleware will check your admin access to the current route.

Access to the roles

You can write your queries with the Role model to get the list of roles and use it on your admin/user CRUD views.

Sync user roles

You can use sync, attach, and detach methods to assign user roles.

Get user roles

Check user access manually

Call the hasPermission method on the user and pass the route name:

Check whether the user has access to any routes of an entity:

Also, you can check if the user has access to his entity:

Check Ownership

Check manually whether the user is the owner of an entity:

Dynamic Policy

Using dynamic policy is straightforward too. Just add authorize middleware to your routes. You can pass the foreign key as a parameter (default is user_id). This middleware checks the foreign key of your entity.

NOTE: It is necessary to use route model binding on your controllers.


All versions of dynamic-acl with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
laravel/framework Version 9.*|10.*
javoscript/laravel-macroable-models Version ^1.0
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 weirdo/dynamic-acl contains the following files

Loading the files please wait ....