class CacheTokenRepository implements TokenRepositoryInterface (View source)

Properties

protected string $format

The format of the stored Carbon object.

Methods

__construct(Repository $cache, Hasher $hasher, string $hashKey, int $expires = 3600, int $throttle = 60, string $prefix = '')

Create a new token repository instance.

string
create(CanResetPassword $user)

Create a new token.

bool
exists(CanResetPassword $user, string $token)

Determine if a token record exists and is valid.

bool
tokenExpired(string $createdAt)

Determine if the token has expired.

bool
recentlyCreatedToken(CanResetPassword $user)

Determine if the given user recently created a password reset token.

bool
tokenRecentlyCreated(string $createdAt)

Determine if the token was recently created.

void
delete(CanResetPassword $user)

Delete a token record.

void
deleteExpired()

Delete expired tokens.

Details

__construct(Repository $cache, Hasher $hasher, string $hashKey, int $expires = 3600, int $throttle = 60, string $prefix = '')

Create a new token repository instance.

Parameters

Repository $cache
Hasher $hasher
string $hashKey
int $expires
int $throttle
string $prefix

string create(CanResetPassword $user)

Create a new token.

Parameters

CanResetPassword $user

Return Value

string

bool exists(CanResetPassword $user, string $token)

Determine if a token record exists and is valid.

Parameters

CanResetPassword $user
string $token

Return Value

bool

protected bool tokenExpired(string $createdAt)

Determine if the token has expired.

Parameters

string $createdAt

Return Value

bool

bool recentlyCreatedToken(CanResetPassword $user)

Determine if the given user recently created a password reset token.

Parameters

CanResetPassword $user

Return Value

bool

protected bool tokenRecentlyCreated(string $createdAt)

Determine if the token was recently created.

Parameters

string $createdAt

Return Value

bool

void delete(CanResetPassword $user)

Delete a token record.

Parameters

CanResetPassword $user

Return Value

void

void deleteExpired()

Delete expired tokens.

Return Value

void

Laravel Cloud is the best place to deploy Laravel, Nuxt, Express, Hono, Node.js, Bun, Go, Flask, Python, and more, with dedicated infrastructure available on AWS through Laravel Private Cloud.