Method | Description | |
---|---|---|
findOrFail ( integer $id, |
Find a discussion by ID, optionally making sure it is visible to a certain user, or throw an exception. | |
getReadIds ( |
Get the IDs of discussions which a user has read completely. | |
query ( ) : |
Get a new query builder for the discussions table. |
Method | Description | |
---|---|---|
scopeVisibleTo ( |
Scope a query to only include records that are visible to a user. |
public findOrFail ( integer $id, |
||
$id | integer | |
$user | ||
return |
public getReadIds ( |
||
$user | ||
return | array |
public query ( ) : |
||
return |
protected scopeVisibleTo ( |
||
$query | ||
$user | ||
return |