Add the `withoutEnded` extension to the builder.

@param \Illuminate\Database\Eloquent\Builder $builder
@return void
180831
protected function addWithoutEnded(Builder $builder): void
    {
        $builder->macro('withoutEnded', function (Builder $builder) {
            return $builder->withoutGlobalScope($this)->where('is_ended', 0);
        });
    }
231538
protected function addOnlyExpired(Builder $builder): void
    {
        $builder->macro('onlyExpired', function (Builder $builder) {
            return $builder->withoutGlobalScope($this)->whereNotNull('expired_at');
        });
    }
338151
protected function addWithoutExpired(Builder $builder): void
    {
        $builder->macro('withoutExpired', function (Builder $builder) {
            return $builder->withoutGlobalScope($this)->where('is_expired', 0);
        });
    }
1365318
protected function addUndoEnd(Builder $builder): void
    {
        $builder->macro('undoEnd', function (Builder $builder) {
            $builder->withEnded();

            return $builder->update(['ended_at' => null]);
        });
    }
499820
protected function addPending(Builder $builder)
    {
        $builder->macro('pending', function (Builder $builder) {
            $model = $builder->getModel();

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

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

            return $builder;
        });
    }
631620
protected function addWithNotApproved(Builder $builder): void
    {
        $builder->macro('withNotApproved', function (Builder $builder) {
            return $builder->withoutGlobalScope($this);
        });
    }
1000239
protected function addWithInactive(Builder $builder)
    {
        $builder->macro('withInactive', function (Builder $builder) {

            $this->remove($builder, $builder->getModel());
            return $builder;
        });
    }
446854
protected function addWithoutNotInvited(Builder $builder): void
    {
        $builder->macro('withoutNotInvited', function (Builder $builder) {
            return $builder->withoutGlobalScope($this)->whereNotNull('invited_at');
        });
    }
808218
public function extend(Builder $builder)
    {
        foreach ($this->extensions as $extension) {
            $this->{"add{$extension}"}($builder);
        }

        $builder->onDelete(function(Builder $builder)
        {
            $column = $this->getDeletedAtColumn($builder);

            return $builder->update(array(
                $column => $builder->getModel()->freshTimestampString()
            ));
        });
    }
599211
protected function addAccept(Builder $builder): void
    {
        $builder->macro('accept', function (Builder $builder) {
            $builder->withNotAccepted();

            return $builder->update(['is_accepted' => 1]);
        });
    }
569456
protected function addKeep(Builder $builder): void
    {
        $builder->macro('keep', function (Builder $builder) {
            $builder->withNotKept();

            return $builder->update(['is_kept' => 1]);
        });
    }
1087295
protected function addWithoutArchived(Builder $builder): void
    {
        $builder->macro('withoutArchived', function (Builder $builder) {
            return $builder->withoutGlobalScope($this)->whereNull('archived_at');
        });
    }
1124955
protected function addWithoutNotPublished(Builder $builder): void
    {
        $builder->macro('withoutNotPublished', function (Builder $builder) {
            return $builder->withoutGlobalScope($this)->whereNotNull('published_at');
        });
    }
193982
protected function addWithPending(Builder $builder)
    {
        $builder->macro('withPending', function (Builder $builder) {
            $this->remove($builder, $builder->getModel());

            return $builder->whereIN($this->getStatusColumn($builder), [Status::APPROVED, Status::PENDING]);
        });
    }
1338302
protected function addUndoApprove(Builder $builder): void
    {
        $builder->macro('undoApprove', function (Builder $builder) {
            return $builder->update(['is_approved' => 0]);
        });
    }
500126
protected function addOnlyNotVerified(Builder $builder): void
    {
        $builder->macro('onlyNotVerified', function (Builder $builder) {
            return $builder->withoutGlobalScope($this)->where('is_verified', 0);
        });
    }
1361267
protected function addUndoKeep(Builder $builder): void
    {
        $builder->macro('undoKeep', function (Builder $builder) {
            return $builder->update(['is_kept' => 0]);
        });
    }