Silber\Bouncer\Database\HasRoles::scopeWhereIsAll PHP Method

scopeWhereIsAll() public method

Constrain the given query by all provided roles.
public scopeWhereIsAll ( Builder $query, string $role ) : void
$query Illuminate\Database\Eloquent\Builder
$role string
return void
    public function scopeWhereIsAll($query, $role)
    {
        $constrainer = new RolesQuery();
        $params = array_slice(func_get_args(), 1);
        array_unshift($params, $query);
        call_user_func_array([$constrainer, 'constrainWhereIsAll'], $params);
    }