DatabaseTokenRepository (Auth\Passwords)

DatabaseTokenRepository

class DatabaseTokenRepository implements TokenRepositoryInterface (View source)

Methods

void __construct(ConnectionInterface $connection, string $table, string $hashKey, int $expires = 60)

Create a new token repository instance.

string create(CanResetPassword $user)

Create a new token record.

bool exists(CanResetPassword $user, string $token)

Determine if a token record exists and is valid.

void delete(string $token)

Delete a token record by token.

void deleteExpired()

Delete expired tokens.

string createNewToken()

Create a new token for the user.

ConnectionInterface getConnection()

Get the database connection instance.

Details

void __construct(ConnectionInterface $connection, string $table, string $hashKey, int $expires = 60)

Create a new token repository instance.

Parameters

ConnectionInterface $connection
string $table
string $hashKey
int $expires

Return Value

void

string create(CanResetPassword $user)

Create a new token record.

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

void delete(string $token)

Delete a token record by token.

Parameters

string $token

Return Value

void

void deleteExpired()

Delete expired tokens.

Return Value

void

string createNewToken()

Create a new token for the user.

Return Value

string

ConnectionInterface getConnection()

Get the database connection instance.

Return Value

ConnectionInterface

© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/5.3/Illuminate/Auth/Passwords/DatabaseTokenRepository.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部