Download the PHP package bfg/permission without Composer

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

Extension permission

Install

  1. Install as dependency:

  2. Set up for mode Permission trait:

  3. Install resources and tables:

About the concept.

The ability to create and monitor the rules for the Laravel gates with the distribution on the role and the ability to control it conveniently. Also comes with a user role model and a list of ready-made roles, such as: Root, Administrator, Moderator, User, Guest.

Description

The package has a hierarchy of roles and can distribute access between them, using the Laravel gates system. The warehouse for the gate is simply "PHP" file with an array in the "Storage" folder.

Where can I use it?

Always when you want to use the authorization control system "Laravel" through the gate, but do not want to cheat a whole bunch of rumbled rows with a gate or create a bunch of files with politicians if you need to control all your gates and disable or switch them between the roles of users.

Publish

Publish configs

Publish migrations

Commands

Commands for managing access and distribution of them between roles.

Permission list

In order to display a full list of rules for the gate.

But it happens so that the rules becomes too much and on this can be used by searching, specifying the search word immediately after the command, for example:

Output:

Allow or add permission

To add immediately with open access or open access to the rule, you must use this command.

If you create a rule as a resource:

You will be created 7 rules with the name you indicated, namely: viewAny-message, view-message, create-message, update-message, delete-message, restore-message, forceDelete-message

In order to manage access for a role or for a user, you can add the following parameter that calls for the user ID or role name:

Opens access to all communication resources for the guest.

Disallow or add permission

To immediately add with closed access or close access to the rule, you must use this command.

All the logic of the team is identical to the opening team.

Delete permission

To remove the rules of the gate from the general list.

You can delete one rule or immediately all its resources using the resource flag:

How to use?

All rules created by you automatically fall into the system of the gate of "Laravel" and in this can be used as before you used the system of the Laravel gates.

Important! If you transmit as a parameter to the gate model that is recovered, the rules will check the field user_id and id user-friendly gate. These fields are configured in the settings user_eq_field and model_eq_field. Or you can write a class verification rule by adding the gateCheck(string $rule, Model $user, Model $model) method into it.


All versions of permission with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0.0
bfg/installer Version *
bfg/entity Version *
bfg/object Version *
bfg/repository Version *
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 bfg/permission contains the following files

Loading the files please wait ....