Download the PHP package infinety-es/token without Composer
On this page you can find all versions of the php package infinety-es/token. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download infinety-es/token
More information about infinety-es/token
Files in infinety-es/token
Download infinety-es/token
More information about infinety-es/token
Files in infinety-es/token
Please rate this library. Is it a good library?
Informations about the package token
Token
Manages random tokens for password resets and other one-time actions
Installation
-
Install via composer:
composer require infinety-es/token
-
Add services provider to
config/app.php
:Infinety\Token\TokenServiceProvider::class,
- Run
php artisan token:migration
thenphp artisan migrate
to add the Token database table
Usage
-
Tokens are handled via
Infinety\Token\Token
, which can be instantiated by the container. Example: - Token parameters:
- Reference: integer ID of the object referred to by the token, e.g. User ID
- Type: string determining the type of the token
- Expires: integer determining how many minutes the token will remain valid for, null (forever) is default
Token::new(int $ref, string $type, int $expires = null)
returns a hasID 40-character codeToken::find(string $code, string $type, bool $$returnRef = true)
returns the reference ID or null if $returnId is = true, or Hashids decoded stringsToken::remove(string $code, string $type)
deletes the token associated with the code (if found)
All versions of token with dependencies
PHP Build Version
Package Version
The package infinety-es/token contains the following files
Loading the files please wait ....