class DiscussionRepository

Methods

Builder
query()

No description

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

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

Builder
getReadIdsQuery(User $user)

<p>Get a query containing the IDs of discussions which a user has read completely.</p>

Builder
scopeVisibleTo(Builder $query, User|null $user = null)

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

Details

Builder query()

Return Value

Builder

Discussion findOrFail(int|string $id, User|null $user = null)

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

Parameters

int|string $id
User|null $user

Return Value

Discussion

Builder getReadIdsQuery(User $user)

<p>Get a query containing the IDs of discussions which a user has read completely.</p>

Parameters

User $user

Return Value

Builder

protected Builder scopeVisibleTo(Builder $query, User|null $user = null)

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

Parameters

Builder $query
User|null $user

Return Value

Builder