trait ScopeVisibilityTrait

Properties

static protected $visibilityScopers

Methods

static 
registerVisibilityScoper($scoper, $ability = null)

No description

scopeWhereVisibleTo(Builder $query, User $actor, string $ability = 'view')

Scope a query to only include records that are visible to a user.

Details

static registerVisibilityScoper($scoper, $ability = null)

Parameters

$scoper
$ability

scopeWhereVisibleTo(Builder $query, User $actor, string $ability = 'view')

Scope a query to only include records that are visible to a user.

Parameters

Builder $query
User $actor
string $ability