Documentation

EloquentUserProvider
in package
implements UserProvider

Interfaces, Classes and Traits

UserProvider

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

Methods

__construct()

Create a new database user provider.

public __construct(Hasher $hasher, string $model) : void
Parameters
$hasher : Hasher
$model : string
Return values
void

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

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

setModel()

Sets the name of the Eloquent user model.

public setModel(string $model) : $this
Parameters
$model : string
Return values
$this

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

Search results