Download the PHP package clarkeash/doorman without Composer

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

Doorman

GitHub Workflow Status GitHub release (latest SemVer)

Doorman provides a way to limit access to your Laravel applications by using invite codes.

Invite Codes:

Laravel Support

Laravel Doorman
5.x 3.x
6.x 4.x
7.x 5.x
8.x 6.x
9.x 7.x
10.x 8.x
11.x 9.x

Installation

You can pull in the package using composer:

Next, migrate the database:

Usage

Generate Invites

Make a single generic invite code with 1 redemption, and no expiry.

Make 5 generic invite codes with 1 redemption each, and no expiry.

Make an invite with 10 redemptions and no expiry.

Make an invite with unlimited redemptions and no expiry.

Make an invite that expires on a specific date.

Make an invite that expires in 14 days.

Make an invite for a specific person.

Alternatively instead of calling make() which will return a collection of invites you can call once() if you only want a single invite generated.

Redeem Invites

You can redeem an invite by calling the ` method. Providing the invite code and optionally an email address.

If doorman is able to redeem the invite code it will increment the number of redemptions by 1, otherwise it will throw an exception.

All of the above exceptions extend ` so you can catch that exception if your application does not need to do anything specific for the above exceptions.

Check Invites without redeeming them

You can check an invite by calling the method. Providing the invite code and optionally an email address. (It has the same signature as the method except it will return or instead of throwing an exception.

Change Error Messages (and translation support)

In order to change the error message returned from doorman, we need to publish the language files like so:

The language files will then be in where you can edit the file, and these messages will be used by doorman. You can create support for other languages by creating extra folders with a file in the directory such as ` where you could place your German translations. Read the localisation docs for more info.

Validation

If you would perfer to validate an invite code before you attempt to redeem it or you are using Form Requests then you can validate it like so:

You should pass the email address into the constructor to validate the code against that email. If you know the code can be used with any email, then you can leave the parameter empty.

Config - change table name

First publish the package configuration:

In config/doorman.php you will see:

If you change the table name and then run your migrations Doorman will then use the new table name.

Console

To remove used and expired invites you can use the cleanup command:


All versions of doorman with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
laravel/framework Version ^11.0
ramsey/uuid Version ^4.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 clarkeash/doorman contains the following files

Loading the files please wait ....