Remove the scope from the given Eloquent query builder.

@param  \Illuminate\Database\Eloquent\Builder  $builder
@param  \Illuminate\Database\Eloquent\Model  $model
@return void
180917
public function remove(Builder $builder, Model $model)
	{
		$column = $model->getQualifiedDeletedAtColumn();

		$query = $builder->getQuery();

		$query->wheres = collect($query->wheres)->reject(function($where) use ($column)
		{
			return $this->isSoftDeleteConstraint($where, $column);
		})->values()->all();
	}
1243896
protected function addOnlyBanned(Builder $builder): void
    {
        $builder->macro('onlyBanned', function (Builder $builder) {
            return $builder->withoutGlobalScope($this)->whereNotNull('banned_at');
        });
    }
191135
protected function addWithNotActivated(Builder $builder): void
    {
        $builder->macro('withNotActivated', function (Builder $builder) {
            return $builder->withoutGlobalScope($this);
        });
    }
981220
public function scopeFiltered(Builder $builder, array $query = [])
    {
        $query = (array)($query ?: Input::all());
        $this->validateFieldNames($query);

        $mode = $this->getQueryMode($query);
        $query = $this->filterNonSearchableParameters($query);
        $constraints = $this->getConstraints($builder, $query);

        $this->applyConstraints($builder, $constraints, $mode);
    }
141885
public function search(Builder $builder)
    {
        try {
            return $this->performSearch($builder);
        } catch (IndexNotFoundException $e) {
            $this->initIndex($builder->model);
        }
    }
55604
public function remove(Builder $builder, Model $model)
    {
        $query      = $builder->getQuery();
        $column     = $model->getQualifiedActiveColumn();
        $bindingKey = 0;

        foreach ((array) $query->wheres as $key => $where) {

            if ($this->isActiveConstraint($where, $column)) {

                $this->removeWhere($query, $key);
                $this->removeBinding($query, $bindingKey);
            }

            if ( ! in_array($where['type'], ['Null', 'NotNull'])) {
                $bindingKey++;
            }
        }
    }
1061312
public function extend(EloquentBuilder $builder)
    {
        $builder->macro('searchable', function (EloquentBuilder $builder, $chunk = null) {
            $builder->chunk($chunk ?: config('scout.chunk.searchable', 500), function ($models) {
                $models->filter->shouldBeSearchable()->searchable();

                event(new ModelsImported($models));
            });
        });

        $builder->macro('unsearchable', function (EloquentBuilder $builder, $chunk = null) {
            $builder->chunk($chunk ?: config('scout.chunk.unsearchable', 500), function ($models) {
                $models->unsearchable();

                event(new ModelsFlushed($models));
            });
        });
    }
750677
private function beforeGet(Builder $builder): void {
    $this->remapBuilderColumns($builder);
    $this->remapWheres($builder);
  }
1353995
public function remove(Builder $builder, Model $model)
    {
        $query      = $builder->getQuery();
        $columns    = $model->getQualifiedOrderByColumns();

        foreach ($columns as $column => $direction) {

            foreach ((array) $query->orders as $key => $order) {

                if ($order['column'] == $column) {
                    $this->removeOrderBy($query, $key);
                }
            }
        }
    }
1370651
protected function addWithClosed(Builder $builder): void
    {
        $builder->macro('withClosed', function (Builder $builder) {
            return $builder->withoutGlobalScope($this);
        });
    }
959559
public function remove(Builder $builder, Eloquent $model)
    {
        $query = $builder->getQuery();

        foreach ((array)$query->wheres as $key => $where)
        {
            // If the where clause is a soft delete date constraint, we will remove it from
            // the query and reset the keys on the wheres. This allows this developer to
            // include deleted model in a relationship result set that is lazy loaded.
            if ($this->isPostTypeConstraint($where, 'post_type'))
            {
                unset($query->wheres[$key]);

                $query->wheres = array_values($query->wheres);
            }
        }
    }
427479
private function remapBuilderColumns(Builder $builder): void {
    if($builder->aggregate === null) {
      if($builder->columns === ['*']) {
        $builder->columns = array_keys($this->to_db);
      }

      if(is_string($builder->columns)) {
        $builder->columns = [$builder->columns];
      }

      $this->remapColumns($builder->columns);
    } else {
      if($builder->aggregate['columns'] == ['*']) {
        return;
      }

      $this->remapColumns($builder->aggregate['columns'], false);
    }
  }
746595
public function apply(Builder $builder, Model $model): void
    {
        $builder->orderBy(self::NAME_ATTRIBUTE);
    }
312969
public function scopeOfOwner(Builder $builder, Model $owner): Builder
    {
        return $builder->where('owner_type', $owner->getMorphClass())->where('owner_id', $owner->getKey());
    }
459910
def _apply_scope(self, scope, builder):
        
        if callable(scope):
            scope(builder)
        elif isinstance(scope, Scope):
            scope.apply(builder, self.get_model())
1116622
public function destroy(Model $model)
    {
        $this->mention->where('model_type', get_class($this->model))
            ->where('model_id', $this->model->getKey())
            ->where('recipient_type', get_class($model))
            ->where('recipient_id', $model->getKey())
            ->delete();
    }
1156222
protected function removeFromTreeByElement(Model $element)
    {
        /** @var \T4\Orm\Model $class */
        $class = get_class($element);
        $tableName = $class::getTableName();
        /** @var \T4\Dbal\Connection $connection */
        $connection = $class::getDbConnection();

        $this->removeFromTreeByLftRgt($connection, $tableName, $element->__lft, $element->__rgt);
    }