EloquentUserProvider
class EloquentUserProvider implements UserProvider (View source)
Properties
| protected Hasher | $hasher | The hasher implementation. |
|
| protected string | $model | The Eloquent user model. |
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.
Get the first key from the credential array.
Validate a user against the given credentials.
Create a new instance of the model.
Gets the name of the Eloquent user model.
Sets the name of the Eloquent user model.
Details
void
__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.
protected string|null
firstCredentialKey(array $credentials)
Get the first key from the credential array.
bool
validateCredentials(Authenticatable $user, array $credentials)
Validate a user against the given credentials.
protected Builder
newModelQuery(Model|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.
string
getModel()
Gets the name of the Eloquent user model.
$this
setModel(string $model)
Sets the name of the Eloquent user model.
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.