class GroupRepository

Methods

Builder
query()

<p>Get a new query builder for the groups table.</p>

findOrFail(int $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>

User|null
findByName(string $name, User $actor = null)

<p>Find a group by name.</p>

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

<p>Scope a query to only include records that are visible to a user.</p>

Details

Builder query()

<p>Get a new query builder for the groups table.</p>

Return Value

Builder

Group findOrFail(int $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 $id
User $actor

Return Value

Group

Exceptions

ModelNotFoundException

User|null findByName(string $name, User $actor = null)

<p>Find a group by name.</p>

Parameters

string $name
User $actor

Return Value

User|null

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

<p>Scope a query to only include records that are visible to a user.</p>

Parameters

Builder $query
User $actor

Return Value

Builder