class DiscussionRepository
Methods
findOrFail(int|string $id, User|null $user = null)
Find a discussion by ID, optionally making sure it is visible to a certain user, or throw an exception.
Builder
getReadIdsQuery(User $user)
Get a query containing the IDs of discussions which a user has read completely.
Builder
scopeVisibleTo(Builder $query, User|null $user = null)
Scope a query to only include records that are visible to a user.
Details
at
line 20
Builder
query()
at
line 29
Discussion
findOrFail(int|string $id, User|null $user = null)
Find a discussion by ID, optionally making sure it is visible to a certain user, or throw an exception.
at
line 41
Builder
getReadIdsQuery(User $user)
Get a query containing the IDs of discussions which a user has read completely.
at
line 56
protected Builder
scopeVisibleTo(Builder $query, User|null $user = null)
Scope a query to only include records that are visible to a user.