EloquentUserProvider
class EloquentUserProvider implements UserProvider (View source)
Properties
protected Hasher | $hasher | The hasher implementation. |
|
protected | $model | ||
protected | $queryCallback | The callback that may modify the user retrieval queries. |
Methods
Retrieve a user by their unique identifier.
Retrieve a user by their unique identifier and "remember me" token.
Update the "remember me" token for the given user in storage.
Retrieve a user by the given credentials.
Validate a user against the given credentials.
Rehash the user's password if required and supported.
Get a new query builder for the model instance.
Create a new instance of the model.
No description
No description
Get the callback that modifies the query before retrieving users.
Sets the callback to modify the query before retrieving users.
Details
__construct(Hasher $hasher, string $model)
Create a new database user provider.
Authenticatable|null
retrieveById(mixed $identifier)
Retrieve a user by their unique identifier.
Authenticatable|null
retrieveByToken(mixed $identifier, string $token)
Retrieve a user by their unique identifier and "remember me" token.
void
updateRememberToken(Authenticatable $user, string $token)
Update the "remember me" token for the given user in storage.
Authenticatable|null
retrieveByCredentials(array $credentials)
Retrieve a user by the given credentials.
bool
validateCredentials(Authenticatable $user, array $credentials)
Validate a user against the given credentials.
void
rehashPasswordIfRequired(Authenticatable $user, array $credentials, bool $force = false)
Rehash the user's password if required and supported.
protected TModel>
newModelQuery(TModel|null $model = null)
Get a new query builder for the model instance.
Model
createModel()
Create a new instance of the model.
Hasher
getHasher()
Gets the hasher implementation.
$this
setHasher(Hasher $hasher)
Sets the hasher implementation.
getModel()
No description
setModel($model)
No description
getQueryCallback()
Get the callback that modifies the query before retrieving users.
$this
withQuery($queryCallback = null)
Sets the callback to modify the query before retrieving users.