EloquentUserProvider::setModel()

$this setModel(string $model) Sets the name of the Eloquent user model. Parameters string $model Return Value $this

EloquentUserProvider::setHasher()

$this setHasher(Hasher $hasher) Sets the hasher implementation. Parameters Hasher $hasher Return Value $this

EloquentUserProvider::retrieveByToken()

Authenticatable|null retrieveByToken(mixed $identifier, string $token) Retrieve a user by their unique identifier and "remember me" token. Parameters mixed $identifier string $token Return Value Authenticatable|null

EloquentUserProvider::retrieveById()

Authenticatable|null retrieveById(mixed $identifier) Retrieve a user by their unique identifier. Parameters mixed $identifier Return Value Authenticatable|null

EloquentUserProvider::retrieveByCredentials()

Authenticatable|null retrieveByCredentials(array $credentials) Retrieve a user by the given credentials. Parameters array $credentials Return Value Authenticatable|null

EloquentUserProvider::getModel()

string getModel() Gets the name of the Eloquent user model. Return Value string

EloquentUserProvider::getHasher()

Hasher getHasher() Gets the hasher implementation. Return Value Hasher

EloquentUserProvider::createModel()

Model createModel() Create a new instance of the model. Return Value Model

EloquentUserProvider

EloquentUserProvider class EloquentUserProvider implements UserProvider (View source) Methods 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)

Eloquent: Serialization

Eloquent: Serialization Introduction Serializing Models & Collections Serializing To Arrays Serializing To JSON Hiding Attributes From JSON Appending Values To JSON Introduction When building JSON APIs, you will often need to convert your models and relationships to arrays or JSON. Eloquent includes convenient methods for making these conversions, as well as controlling which attributes are included in your serializations.