PHPackages                             infinety-es/token - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. infinety-es/token

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

infinety-es/token
=================

Custom token generation

1.1(10y ago)011MITPHPPHP &gt;=5.5.9

Since May 2Pushed 10y ago1 watchersCompare

[ Source](https://github.com/Krato/token)[ Packagist](https://packagist.org/packages/infinety-es/token)[ RSS](/packages/infinety-es-token/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (4)Versions (3)Used By (0)

Token
=====

[](#token)

Manages random tokens for password resets and other one-time actions

### Installation

[](#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` then `php artisan migrate` to add the Token database table

### Usage

[](#usage)

- Tokens are handled via `Infinety\Token\Token`, which can be instantiated by the container. Example:

```
  $token = new Token;
  $token->add($myId, 'test', 1)
```

- 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 code
- `Token::find(string $code, string $type, bool $$returnRef = true)` returns the reference ID or null if $returnId is = true, or Hashids decoded strings
- `Token::remove(string $code, string $type)` deletes the token associated with the code (if found)

###  Health Score

25

—

LowBetter than 36% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

3710d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3865030b01e29299f1f6837852ba6a70fea204ceb46e58a917d4e4398268800f?d=identicon)[Krato1](/maintainers/Krato1)

---

Top Contributors

[![Krato](https://avatars.githubusercontent.com/u/74367?v=4)](https://github.com/Krato "Krato (1 commits)")

---

Tags

tokenlaravel 5infinety

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/infinety-es-token/health.svg)

```
[![Health](https://phpackages.com/badges/infinety-es-token/health.svg)](https://phpackages.com/packages/infinety-es-token)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3345.1M337](/packages/psalm-plugin-laravel)[illuminate/pipeline

The Illuminate Pipeline package.

9348.3M267](/packages/illuminate-pipeline)[illuminate/pagination

The Illuminate Pagination package.

10533.5M991](/packages/illuminate-pagination)[illuminate/cookie

The Illuminate Cookie package.

224.5M132](/packages/illuminate-cookie)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
