Documentation

DatabaseTokenRepository
in package
implements TokenRepositoryInterface

Interfaces, Classes and Traits

TokenRepositoryInterface

Table of Contents

$connection  : ConnectionInterface
The database connection instance.
$expires  : int
The number of seconds a token should last.
$hasher  : Hasher
The Hasher implementation.
$hashKey  : string
The hashing key.
$table  : string
The token database table.
__construct()  : void
Create a new token repository instance.
create()  : string
Create a new token record.
createNewToken()  : string
Create a new token for the user.
delete()  : void
Delete a token record by user.
deleteExpired()  : void
Delete expired tokens.
exists()  : bool
Determine if a token record exists and is valid.
getConnection()  : ConnectionInterface
Get the database connection instance.
getHasher()  : Hasher
Get the hasher instance.
deleteExisting()  : int
Delete all existing reset tokens from the database.
getPayload()  : array<string|int, mixed>
Build the record payload for the table.
getTable()  : Builder
Begin a new database query against the table.
tokenExpired()  : bool
Determine if the token has expired.

Properties

Methods

createNewToken()

Create a new token for the user.

public createNewToken() : string
Return values
string

getPayload()

Build the record payload for the table.

protected getPayload(string $email, string $token) : array<string|int, mixed>
Parameters
$email : string
$token : string
Return values
array<string|int, mixed>

tokenExpired()

Determine if the token has expired.

protected tokenExpired(string $createdAt) : bool
Parameters
$createdAt : string
Return values
bool

Search results