@param Builder $builder

@return Builder
970083
public function run(Builder $builder): Builder
    {
        return $builder->where('created_at', '>', $this->request->input('created_at.start'))
            ->where('created_at', '<', $this->request->input('created_at.end'));
    }
1052264
public function apply(Builder $builder)
    {
        $this->builder = $builder;

        foreach ($this->filters() as $name => $value) {
            if (! method_exists($this, $name)) {
                continue;
            }

            if (is_array($value) or trim($value)) {
                $this->$name($value);
            } else {
                $this->$name();
            }
        }

        return $this->builder;
    }
567405
public function apply(Builder $table)
    {
        foreach ($this->getRightValue() as $item) {
            $table = $table->where(
                $this->getLeftValue(),
                $this->getOperator(),
                $item
            );
        }

        return $table;
    }
715615
public function get(Builder $builder)
    {
        return $this->map(
            $builder, $this->search($builder), $builder->model
        );
    }
1057947
protected function addWithDrafts(Builder $builder)
    {
        $builder->macro('withDrafts', function (Builder $builder) {
            $this->remove($builder, $builder->getModel());

            return $builder;
        });
    }
57964
protected function addDraft(Builder $builder): void
    {
        $builder->macro('draft', function (Builder $builder) {
            return $builder->update(['is_drafted' => 1]);
        });
    }
929840
public function build($builder, $parameters) {
		$instance = $this->builder->build($builder, $parameters);

		return $instance;
	}
1259807
protected function addWithAnyStatus(Builder $builder)
    {
        $builder->macro('withAnyStatus', function (Builder $builder) {
            $this->remove($builder, $builder->getModel());
            return $builder;
        });
    }
93446
public function get(Builder $builder)
    {
        // First, we will retrieve the field's value using our composed behavior.
        $value = $this->behavior->get(
            $builder->field,
            $builder->id,
            ! $builder->raw
        );

        // Next, we will iterate over the defined components and pass our value
        // through each component's method if it was defined on the builder.
        foreach ($this->components as $component) {
            if (! is_null($builder->$component)) {
                $method = 'run'.ucfirst($component);

                $value = $this->$method($builder->$component, $value);
            }
        }

        return $value;
    }
385974
protected function addWithoutTranslation(Builder $builder)
    {
        $builder->macro('withoutTranslation', function(Builder $builder) {
            return $builder->withoutGlobalScope($this);
        });
    }
857689
protected function addPostponed(Builder $builder)
    {
        $builder->macro('postponed', function (Builder $builder) {
            $model = $builder->getModel();

            $this->remove($builder, $model);

            $builder->where($model->getQualifiedStatusColumn(), '=', Status::POSTPONED);

            return $builder;
        });
    }
108728
public static function builder($builder = null)
    {
        if (is_object($builder)) {
            self::$builder = $builder;
        }

        return isset(self::$builder) ? self::$builder : self::$builder = new Builder;
    }
106915
public function apply(Builder $table)
    {
        if (!$this->specifications) {
            $table = $table->with($this->with);
            return $table;
        }

        $callbacks = $this->specifications;
        $table = $table->with([$this->with => function(Relation $builder) use ($callbacks) {
            foreach ($callbacks as $callback) {
                $builder = $callback->apply($builder->getQuery());
            }
        }]);

        return $table;
    }
152155
protected function addReject(Builder $builder)
    {
        $builder->macro('reject', function (Builder $builder, $id = null) {
            $builder->withAnyStatus();
            return $this->updateModerationStatus($builder, $id, Status::REJECTED);

        });
    }
155252
protected function addOnlyTrashed(Builder $builder)
    {
        $builder->macro('onlyTrashed', function (Builder $builder) {
            $model = $builder->getModel();

            $builder->withoutGlobalScope($this)->whereNotNull(
                $model->getQualifiedDeletedAtColumn()
            );

            return $builder;
        });
    }
1167506
protected function addWithRejected(Builder $builder)
    {
        $builder->macro('withRejected', function (Builder $builder) {
            $this->remove($builder, $builder->getModel());

            return $builder->whereIN($this->getStatusColumn($builder),
                [Status::APPROVED, Status::REJECTED]);
        });
    }
191135
protected function addWithNotActivated(Builder $builder): void
    {
        $builder->macro('withNotActivated', function (Builder $builder) {
            return $builder->withoutGlobalScope($this);
        });
    }