EloquentUserProvider
class EloquentUserProvider implements UserProviderInterface (View source)
Properties
protected HasherInterface | $hasher | The hasher implementation. | |
protected string | $model | The Eloquent user model. |
Methods
void | __construct(HasherInterface $hasher, string $model) Create a new database user provider. | |
UserInterface|null | retrieveById(mixed $identifier) Retrieve a user by their unique identifier. | |
UserInterface|null | retrieveByToken(mixed $identifier, string $token) Retrieve a user by their unique identifier and "remember me" token. | |
void | updateRememberToken(UserInterface $user, string $token) Update the "remember me" token for the given user in storage. | |
UserInterface|null | retrieveByCredentials(array $credentials) Retrieve a user by the given credentials. | |
bool | validateCredentials(UserInterface $user, array $credentials) Validate a user against the given credentials. | |
Model | createModel() Create a new instance of the model. |
Details
void __construct(HasherInterface $hasher, string $model)
Create a new database user provider.
UserInterface|null retrieveById(mixed $identifier)
Retrieve a user by their unique identifier.
UserInterface|null retrieveByToken(mixed $identifier, string $token)
Retrieve a user by their unique identifier and "remember me" token.
void updateRememberToken(UserInterface $user, string $token)
Update the "remember me" token for the given user in storage.
UserInterface|null retrieveByCredentials(array $credentials)
Retrieve a user by the given credentials.
bool validateCredentials(UserInterface $user, array $credentials)
Validate a user against the given credentials.
Model createModel()
Create a new instance of the model.
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/4.2/Illuminate/Auth/EloquentUserProvider.html