Add the `withExpired` extension to the builder.

@param \Illuminate\Database\Eloquent\Builder $builder
@return void
482304
protected function addWithExpired(Builder $builder): void
    {
        $builder->macro('withExpired', function (Builder $builder) {
            return $builder->withoutGlobalScope($this);
        });
    }
359861
protected function addOnlyEnded(Builder $builder): void
    {
        $builder->macro('onlyEnded', function (Builder $builder) {
            return $builder->withoutGlobalScope($this)->where('is_ended', 1);
        });
    }
477474
protected function addWithNotInvited(Builder $builder): void
    {
        $builder->macro('withNotInvited', function (Builder $builder) {
            return $builder->withoutGlobalScope($this);
        });
    }
821728
public function apply(Builder $builder, Model $model)
    {
        if (!UserUtils::hasDisplayAllStatus())
        {
            $builder->where($model->getQualifiedStatusColumn(), true);
        }
        $this->extend($builder);

    }
1370651
protected function addWithClosed(Builder $builder): void
    {
        $builder->macro('withClosed', function (Builder $builder) {
            return $builder->withoutGlobalScope($this);
        });
    }
1338302
protected function addUndoApprove(Builder $builder): void
    {
        $builder->macro('undoApprove', function (Builder $builder) {
            return $builder->update(['is_approved' => 0]);
        });
    }
638688
protected function addInvite(Builder $builder): void
    {
        $builder->macro('invite', function (Builder $builder) {
            $builder->withNotInvited();

            return $builder->update(['is_invited' => 1]);
        });
    }
1324012
protected function addVerify(Builder $builder): void
    {
        $builder->macro('verify', function (Builder $builder) {
            $builder->withNotVerified();

            return $builder->update(['verified_at' => Date::now()]);
        });
    }
817278
protected function addDraft(Builder $builder): void
    {
        $builder->macro('draft', function (Builder $builder) {
            return $builder->update(['drafted_at' => Date::now()]);
        });
    }
1289328
protected function addWithNotVerified(Builder $builder): void
    {
        $builder->macro('withNotVerified', function (Builder $builder) {
            return $builder->withoutGlobalScope($this);
        });
    }
280939
protected function addApprove(Builder $builder): void
    {
        $builder->macro('approve', function (Builder $builder) {
            $builder->withNotApproved();

            return $builder->update(['approved_at' => Date::now()]);
        });
    }
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));
            });
        });
    }
713978
protected function addWithoutNotVerified(Builder $builder): void
    {
        $builder->macro('withoutNotVerified', function (Builder $builder) {
            return $builder->withoutGlobalScope($this)->where('is_verified', 1);
        });
    }
341414
protected function addOnlyEnded(Builder $builder): void
    {
        $builder->macro('onlyEnded', function (Builder $builder) {
            return $builder->withoutGlobalScope($this)->whereNotNull('ended_at');
        });
    }
917169
protected function addEnd(Builder $builder): void
    {
        $builder->macro('end', function (Builder $builder) {
            return $builder->update(['is_ended' => 1]);
        });
    }
732383
def extend(self, builder):
        
        for extension in self._extensions:
            getattr(self, '_add_%s' % extension)(builder)

        builder.on_delete(self._on_delete)
63194
protected function addArchive(Builder $builder): void
    {
        $builder->macro('archive', function (Builder $builder) {
            return $builder->update(['archived_at' => Date::now()]);
        });
    }