Download the PHP package rs/laravel-doorman without Composer

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

Laravel Version Control

This package provides traits to use to quickly scaffold role based permissions to your laravel project.

Once installed we can do the following:

``

Permissions are registered with Laravel's gate and so it is possible to check using any laravel gate methods.

Installation

`

The service provider will be automatically registered.

Configuration file can be published using the artisan command.

`

Configuration

Configuration allows you to specify which models you would like to use for the Role and Permission. By default they use models defined by the package. If extra functionality is required or you would like to use your own models then they can be updated here.

Migrations

`

This will run the default migrations needed. If you like to change the default migrations you can publish the migration files.

`

If you dont want any migrations to run then you can disable the migrations in the config file.

Basic usage

User

Add the HasPermissionsViaRoles trait to your User model.

A role can be assigned to any user:

A role can be removed from a user:

Roles can also be synced:

You can determine if a user has a certain role:

Permissions and roles can be accessed from the user using the HasPermissionsViaRoles trait.

You can check if a user has a permission:

Permissions and roles

A permission can be assigned to a role using 1 of these methods:

Multiple permissions can be synced to a role using 1 of these methods:

A permission can be removed from a role using 1 of these methods:

Permission and role customization

If you would like to setup your own permission and role models then you can update the configuration to use your own models.

The existing doorman models can be extended or the models can use the existing traits.

When implementing your own models the models must fulfil the Role and Permission Contracts.

An example of a role model.

An example of the permission model.


All versions of laravel-doorman with dependencies

PHP Build Version
Package Version
Requires php Version ^8.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 rs/laravel-doorman contains the following files

Loading the files please wait ....