DatabaseUserProvider
in package
implements
UserProvider
Interfaces, Classes and Traits
Table of Contents
- $conn : ConnectionInterface
- The active database connection.
- $hasher : Hasher
- The hasher implementation.
- $table : string
- The table containing the users.
- __construct() : void
- Create a new database user provider.
- retrieveByCredentials() : Authenticatable|null
- Retrieve a user by the given credentials.
- retrieveById() : Authenticatable|null
- Retrieve a user by their unique identifier.
- retrieveByToken() : Authenticatable|null
- Retrieve a user by their unique identifier and "remember me" token.
- updateRememberToken() : void
- Update the "remember me" token for the given user in storage.
- validateCredentials() : bool
- Validate a user against the given credentials.
- getGenericUser() : GenericUser|null
- Get the generic user.
Properties
$conn
The active database connection.
protected
ConnectionInterface
$conn
$hasher
The hasher implementation.
protected
Hasher
$hasher
$table
The table containing the users.
protected
string
$table
Methods
__construct()
Create a new database user provider.
public
__construct(ConnectionInterface $conn, Hasher $hasher, string $table) : void
Parameters
- $conn : ConnectionInterface
- $hasher : Hasher
- $table : string
Return values
void —retrieveByCredentials()
Retrieve a user by the given credentials.
public
retrieveByCredentials(array<string|int, mixed> $credentials) : Authenticatable|null
Parameters
- $credentials : array<string|int, mixed>
Return values
Authenticatable|null —retrieveById()
Retrieve a user by their unique identifier.
public
retrieveById(mixed $identifier) : Authenticatable|null
Parameters
- $identifier : mixed
Return values
Authenticatable|null —retrieveByToken()
Retrieve a user by their unique identifier and "remember me" token.
public
retrieveByToken(mixed $identifier, string $token) : Authenticatable|null
Parameters
- $identifier : mixed
- $token : string
Return values
Authenticatable|null —updateRememberToken()
Update the "remember me" token for the given user in storage.
public
updateRememberToken(Authenticatable $user, string $token) : void
Parameters
- $user : Authenticatable
- $token : string
Return values
void —validateCredentials()
Validate a user against the given credentials.
public
validateCredentials(Authenticatable $user, array<string|int, mixed> $credentials) : bool
Parameters
- $user : Authenticatable
- $credentials : array<string|int, mixed>
Return values
bool —getGenericUser()
Get the generic user.
protected
getGenericUser(mixed $user) : GenericUser|null
Parameters
- $user : mixed