Add the `withoutBanned` extension to the builder.

@param \Illuminate\Database\Eloquent\Builder $builder
@return void
492248
protected function addWithoutBanned(Builder $builder): void
    {
        $builder->macro('withoutBanned', function (Builder $builder) {
            return $builder->withoutGlobalScope($this)->whereNull('banned_at');
        });
    }
77179
protected function addWithoutDrafted(Builder $builder): void
    {
        $builder->macro('withoutDrafted', function (Builder $builder) {
            return $builder->withoutGlobalScope($this)->where('is_drafted', 0);
        });
    }
42516
protected function addApprove(Builder $builder)
    {
        $builder->macro('approve', function (Builder $builder, $id = null) {
            $builder->withAnyStatus();
            return $this->updateModerationStatus($builder, $id, Status::APPROVED);
        });
    }
720121
protected function addWithoutNotKept(Builder $builder): void
    {
        $builder->macro('withoutNotKept', function (Builder $builder) {
            return $builder->withoutGlobalScope($this)->where('is_kept', 1);
        });
    }
183767
protected function addWithNotAccepted(Builder $builder): void
    {
        $builder->macro('withNotAccepted', function (Builder $builder) {
            return $builder->withoutGlobalScope($this);
        });
    }
1308337
protected function addOnlyNotKept(Builder $builder): void
    {
        $builder->macro('onlyNotKept', function (Builder $builder) {
            return $builder->withoutGlobalScope($this)->where('is_kept', 0);
        });
    }
1298095
protected function addWithoutDrafted(Builder $builder): void
    {
        $builder->macro('withoutDrafted', function (Builder $builder) {
            return $builder->withoutGlobalScope($this)->whereNull('drafted_at');
        });
    }
280939
protected function addApprove(Builder $builder): void
    {
        $builder->macro('approve', function (Builder $builder) {
            $builder->withNotApproved();

            return $builder->update(['approved_at' => Date::now()]);
        });
    }
341414
protected function addOnlyEnded(Builder $builder): void
    {
        $builder->macro('onlyEnded', function (Builder $builder) {
            return $builder->withoutGlobalScope($this)->whereNotNull('ended_at');
        });
    }
849239
protected function addInvite(Builder $builder): void
    {
        $builder->macro('invite', function (Builder $builder) {
            $builder->withNotInvited();

            return $builder->update(['invited_at' => Date::now()]);
        });
    }
1000239
protected function addWithInactive(Builder $builder)
    {
        $builder->macro('withInactive', function (Builder $builder) {

            $this->remove($builder, $builder->getModel());
            return $builder;
        });
    }
101300
protected function addOnlyClosed(Builder $builder): void
    {
        $builder->macro('onlyClosed', function (Builder $builder) {
            return $builder->withoutGlobalScope($this)->where('is_closed', 1);
        });
    }
885467
protected function addWithTrashed(Builder $builder)
    {
        $builder->macro('withTrashed', function (Builder $builder) {
            return $builder->withoutGlobalScope($this);
        });
    }
399166
protected function addWithoutNotInvited(Builder $builder): void
    {
        $builder->macro('withoutNotInvited', function (Builder $builder) {
            return $builder->withoutGlobalScope($this)->where('is_invited', 1);
        });
    }
599211
protected function addAccept(Builder $builder): void
    {
        $builder->macro('accept', function (Builder $builder) {
            $builder->withNotAccepted();

            return $builder->update(['is_accepted' => 1]);
        });
    }
341027
protected function addOnlyDrafted(Builder $builder): void
    {
        $builder->macro('onlyDrafted', function (Builder $builder) {
            return $builder->withoutGlobalScope($this)->where('is_drafted', 1);
        });
    }
1199168
protected function addWithTrashed(Builder $builder)
    {
        $builder->macro('withTrashed', function (Builder $builder, $withTrashed = true) {
            if (! $withTrashed) {
                return $builder->withoutTrashed();
            }

            return $builder->withoutGlobalScope($this);
        });
    }