class UserRepository

Methods

Builder
query()

No description

Model
findOrFail(int|string $id, User $actor = null)

<p>Find a user by ID, optionally making sure it is visible to a certain user, or throw an exception.</p>

Model
findOrFailByUsername(string $username, User $actor = null)

<p>Find a user by username, optionally making sure it is visible to a certain user, or throw an exception.</p>

Model|null
findByIdentification(string $identification)

<p>Find a user by an identification (username or email).</p>

Model|null
findByEmail(string $email)

No description

int|null
getIdForUsername(string $username, User $actor = null)

No description

array
getIdsForUsernames(array $usernames, User $actor = null)

No description

array
getIdsForUsername(string $string, User $actor = null)

<p>Find users by matching a string of words against their username, optionally making sure they are visible to a certain user.</p>

Builder
scopeVisibleTo(Builder $query, User $actor = null)

No description

Details

Builder query()

Return Value

Builder

Model findOrFail(int|string $id, User $actor = null)

<p>Find a user by ID, optionally making sure it is visible to a certain user, or throw an exception.</p>

Parameters

int|string $id
User $actor

Return Value

Model

Exceptions

ModelNotFoundException

Model findOrFailByUsername(string $username, User $actor = null)

<p>Find a user by username, optionally making sure it is visible to a certain user, or throw an exception.</p>

Parameters

string $username
User $actor

Return Value

Model

Exceptions

ModelNotFoundException

Model|null findByIdentification(string $identification)

<p>Find a user by an identification (username or email).</p>

Parameters

string $identification

Return Value

Model|null

Model|null findByEmail(string $email)

Parameters

string $email

Return Value

Model|null

int|null getIdForUsername(string $username, User $actor = null)

Parameters

string $username
User $actor

Return Value

int|null

array getIdsForUsernames(array $usernames, User $actor = null)

Parameters

array $usernames
User $actor

Return Value

array

array getIdsForUsername(string $string, User $actor = null)

<p>Find users by matching a string of words against their username, optionally making sure they are visible to a certain user.</p>

Parameters

string $string
User $actor

Return Value

array

protected Builder scopeVisibleTo(Builder $query, User $actor = null)

Parameters

Builder $query
User $actor

Return Value

Builder