EloquentUserProvider
in package
implements
UserProvider
Interfaces, Classes and Traits
Table of Contents
- $hasher : Hasher
- The hasher implementation.
- $model : string
- The Eloquent user model.
- __construct() : void
- Create a new database user provider.
- createModel() : Model
- Create a new instance of the model.
- getHasher() : Hasher
- Gets the hasher implementation.
- getModel() : string
- Gets the name of the Eloquent user model.
- 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.
- setHasher() : $this
- Sets the hasher implementation.
- setModel() : $this
- Sets the name of the Eloquent user model.
- updateRememberToken() : void
- Update the "remember me" token for the given user in storage.
- validateCredentials() : bool
- Validate a user against the given credentials.
Properties
$hasher
The hasher implementation.
protected
Hasher
$hasher
$model
The Eloquent user model.
protected
string
$model
Methods
__construct()
Create a new database user provider.
public
__construct(Hasher $hasher, string $model) : void
Parameters
- $hasher : Hasher
- $model : string
Return values
void —createModel()
Create a new instance of the model.
public
createModel() : Model
Return values
Model —getHasher()
Gets the hasher implementation.
public
getHasher() : Hasher
Return values
Hasher —getModel()
Gets the name of the Eloquent user model.
public
getModel() : string
Return values
string —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 —setHasher()
Sets the hasher implementation.
public
setHasher(Hasher $hasher) : $this
Parameters
- $hasher : Hasher
Return values
$this —setModel()
Sets the name of the Eloquent user model.
public
setModel(string $model) : $this
Parameters
- $model : string
Return values
$this —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>