Add the `onlyEnded` extension to the builder.

@param \Illuminate\Database\Eloquent\Builder $builder
@return void
359861
protected function addOnlyEnded(Builder $builder): void
    {
        $builder->macro('onlyEnded', function (Builder $builder) {
            return $builder->withoutGlobalScope($this)->where('is_ended', 1);
        });
    }
985179
protected function addOnlyDrafted(Builder $builder): void
    {
        $builder->macro('onlyDrafted', function (Builder $builder) {
            return $builder->withoutGlobalScope($this)->whereNotNull('drafted_at');
        });
    }
101300
protected function addOnlyClosed(Builder $builder): void
    {
        $builder->macro('onlyClosed', function (Builder $builder) {
            return $builder->withoutGlobalScope($this)->where('is_closed', 1);
        });
    }
82553
protected function addClose(Builder $builder): void
    {
        $builder->macro('close', function (Builder $builder) {
            return $builder->update(['is_closed' => 1]);
        });
    }
341027
protected function addOnlyDrafted(Builder $builder): void
    {
        $builder->macro('onlyDrafted', function (Builder $builder) {
            return $builder->withoutGlobalScope($this)->where('is_drafted', 1);
        });
    }
500126
protected function addOnlyNotVerified(Builder $builder): void
    {
        $builder->macro('onlyNotVerified', function (Builder $builder) {
            return $builder->withoutGlobalScope($this)->where('is_verified', 0);
        });
    }
626470
protected function addUndoAccept(Builder $builder): void
    {
        $builder->macro('undoAccept', function (Builder $builder) {
            return $builder->update(['accepted_at' => null]);
        });
    }
638688
protected function addInvite(Builder $builder): void
    {
        $builder->macro('invite', function (Builder $builder) {
            $builder->withNotInvited();

            return $builder->update(['is_invited' => 1]);
        });
    }
1289328
protected function addWithNotVerified(Builder $builder): void
    {
        $builder->macro('withNotVerified', function (Builder $builder) {
            return $builder->withoutGlobalScope($this);
        });
    }
911424
protected function addUnordered(Builder $builder)
    {
        $builder->macro('unordered', function (Builder $builder) {

            $this->remove($builder, $builder->getModel());
            return $builder;
        });
    }
338151
protected function addWithoutExpired(Builder $builder): void
    {
        $builder->macro('withoutExpired', function (Builder $builder) {
            return $builder->withoutGlobalScope($this)->where('is_expired', 0);
        });
    }
1043918
protected function addOnlyTrashed(Builder $builder)
	{
		$builder->macro('onlyTrashed', function(Builder $builder)
		{
			$model = $builder->getModel();

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

			$builder->getQuery()->whereNotNull($model->getQualifiedDeletedAtColumn());

			return $builder;
		});
	}
379104
protected function addUndoClose(Builder $builder): void
    {
        $builder->macro('undoClose', function (Builder $builder) {
            $builder->withClosed();

            return $builder->update(['is_closed' => 0]);
        });
    }
874486
protected function addWithBanned(Builder $builder): void
    {
        $builder->macro('withBanned', function (Builder $builder) {
            return $builder->withoutGlobalScope($this);
        });
    }
1120178
protected function addOnlyNotApproved(Builder $builder): void
    {
        $builder->macro('onlyNotApproved', function (Builder $builder) {
            return $builder->withoutGlobalScope($this)->where('is_approved', 0);
        });
    }
23062
protected function addOnlyNotInvited(Builder $builder): void
    {
        $builder->macro('onlyNotInvited', function (Builder $builder) {
            return $builder->withoutGlobalScope($this)->where('is_invited', 0);
        });
    }
180831
protected function addWithoutEnded(Builder $builder): void
    {
        $builder->macro('withoutEnded', function (Builder $builder) {
            return $builder->withoutGlobalScope($this)->where('is_ended', 0);
        });
    }