Download the PHP package laravarc/authorizer without Composer

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

Laravarc Authorizer

RBAC for Laravel — roles, abilities, and Gate::before() checks.

Works in any Laravel 10–13 application, with or without laravarc/core.

Design

Installation

Add the trait to your user model:

Route middleware

Alias Purpose
laravarc.authorize.super Require an authenticated user with an Authorizer super role (isSuper())

When using laravarc/core, ability-based route checks use Core's laravarc.authorize middleware (same laravarc.authorize* family).

How authorization works

Fluent API

Grant expansion

grant(Policy::class) stores expanded rows in larc_role_abilities (one per ability), not a live policy.* rule.

When laravarc:authorizer sync later discovers a new method on that policy, existing roles that previously granted the policy do not automatically receive the new ability. Re-grant the policy (or grant the new method) after sync.

Commands

Command Alias Purpose
laravarc:authorizer cache larc:authorizer cache Build ability index (PSR-4 policy scan)
laravarc:authorizer cache --clear same Clear cached index
laravarc:authorizer sync larc:authorizer sync Sync abilities to the database
laravarc:authorizer sync --dry-run same Preview only
laravarc:authorizer sync --auto-delete-missing same Delete missing abilities without prompts
laravarc:authorizer install larc:authorizer install Seed the system super role (is_super + is_system)

Multi-tenant

null from current() means global (single-tenant) roles and leaves hasAbility() on the union-all path. When current() returns a non-null id, hasAbility() only counts role grants for roles with that tenant_id (is_super still bypasses; NULL-tenant non-super roles do not match). Role name uniqueness is enforced in the service layer (SQL UNIQUE alone is unsafe with NULL tenant_id).

Core integration (optional)

Core rebinds AbilityRegistry to MetadataAbilityRegistry. Authorizer never imports Core.

License

MIT — see LICENSE.


All versions of authorizer with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
illuminate/support Version ^10.0|^11.0|^12.0|^13.0
illuminate/contracts Version ^10.0|^11.0|^12.0|^13.0
illuminate/console Version ^10.0|^11.0|^12.0|^13.0
illuminate/database Version ^10.0|^11.0|^12.0|^13.0
illuminate/auth Version ^10.0|^11.0|^12.0|^13.0
illuminate/filesystem Version ^10.0|^11.0|^12.0|^13.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 laravarc/authorizer contains the following files

Loading the files please wait ...