Package Data | |
---|---|
Maintainer Username: | Krato1 |
Maintainer Contact: | info@ericlagarda.com (Eric Lagarda) |
Package Create Date: | 2016-05-02 |
Package Last Update: | 2016-05-02 |
Home Page: | |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-12-11 15:03:41 |
Package Statistics | |
---|---|
Total Downloads: | 8 |
Monthly Downloads: | 0 |
Daily Downloads: | 0 |
Total Stars: | 0 |
Total Watchers: | 3 |
Total Forks: | 0 |
Total Open Issues: | 0 |
Manages random tokens for password resets and other one-time actions
Install via composer: composer require infinety-es/token
Add services provider to config/app.php
:
Infinety\Token\TokenServiceProvider::class,
Run php artisan token:migration
then php artisan migrate
to add the Token database table
Infinety\Token\Token
, which can be instantiated by the container. Example: $token = new Token;
$token->add($myId, 'test', 1)
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)