Silber\Bouncer\Database\IsRole::scopeWhereAssignedTo PHP Method

scopeWhereAssignedTo() public method

Constrain the given query to roles that were assigned to the given authorities.
public scopeWhereAssignedTo ( Builder $query, string | Model | Illuminate\Database\Eloquent\Collection $model, array $keys = null ) : void
$query Illuminate\Database\Eloquent\Builder
$model string | Illuminate\Database\Eloquent\Model | Illuminate\Database\Eloquent\Collection
$keys array
return void
    public function scopeWhereAssignedTo($query, $model, array $keys = null)
    {
        (new RolesQuery())->constrainWhereAssignedTo($query, $model, $keys);
    }