Add the `withNotKept` extension to the builder.

@param \Illuminate\Database\Eloquent\Builder $builder
@return void
543229
protected function addWithNotKept(Builder $builder): void
    {
        $builder->macro('withNotKept', function (Builder $builder) {
            return $builder->withoutGlobalScope($this);
        });
    }
1199168
protected function addWithTrashed(Builder $builder)
    {
        $builder->macro('withTrashed', function (Builder $builder, $withTrashed = true) {
            if (! $withTrashed) {
                return $builder->withoutTrashed();
            }

            return $builder->withoutGlobalScope($this);
        });
    }
338151
protected function addWithoutExpired(Builder $builder): void
    {
        $builder->macro('withoutExpired', function (Builder $builder) {
            return $builder->withoutGlobalScope($this)->where('is_expired', 0);
        });
    }
55943
protected function addPublish(Builder $builder): void
    {
        $builder->macro('publish', function (Builder $builder) {
            $builder->withNotPublished();

            return $builder->update(['is_published' => 1]);
        });
    }
385974
protected function addWithoutTranslation(Builder $builder)
    {
        $builder->macro('withoutTranslation', function(Builder $builder) {
            return $builder->withoutGlobalScope($this);
        });
    }
339242
public function apply(Builder $builder)
    {
        $model = $builder->getModel();

        $builder->whereNull($model->getQualifiedDeletedAtColumn());

        $this->extend($builder);
    }
534852
protected function addVerify(Builder $builder): void
    {
        $builder->macro('verify', function (Builder $builder) {
            $builder->withNotVerified();

            return $builder->update(['is_verified' => 1]);
        });
    }
82553
protected function addClose(Builder $builder): void
    {
        $builder->macro('close', function (Builder $builder) {
            return $builder->update(['is_closed' => 1]);
        });
    }
713978
protected function addWithoutNotVerified(Builder $builder): void
    {
        $builder->macro('withoutNotVerified', function (Builder $builder) {
            return $builder->withoutGlobalScope($this)->where('is_verified', 1);
        });
    }
718033
protected function addOnlyNotInvited(Builder $builder): void
    {
        $builder->macro('onlyNotInvited', function (Builder $builder) {
            return $builder->withoutGlobalScope($this)->whereNull('invited_at');
        });
    }
1120178
protected function addOnlyNotApproved(Builder $builder): void
    {
        $builder->macro('onlyNotApproved', function (Builder $builder) {
            return $builder->withoutGlobalScope($this)->where('is_approved', 0);
        });
    }
167179
protected function addOnlyNotApproved(Builder $builder): void
    {
        $builder->macro('onlyNotApproved', function (Builder $builder) {
            return $builder->withoutGlobalScope($this)->whereNull('approved_at');
        });
    }
1361267
protected function addUndoKeep(Builder $builder): void
    {
        $builder->macro('undoKeep', function (Builder $builder) {
            return $builder->update(['is_kept' => 0]);
        });
    }
626470
protected function addUndoAccept(Builder $builder): void
    {
        $builder->macro('undoAccept', function (Builder $builder) {
            return $builder->update(['accepted_at' => null]);
        });
    }
849239
protected function addInvite(Builder $builder): void
    {
        $builder->macro('invite', function (Builder $builder) {
            $builder->withNotInvited();

            return $builder->update(['invited_at' => Date::now()]);
        });
    }
413393
protected function addOnlyNotPublished(Builder $builder): void
    {
        $builder->macro('onlyNotPublished', function (Builder $builder) {
            return $builder->withoutGlobalScope($this)->whereNull('published_at');
        });
    }
445078
protected function addOnlyNotActivated(Builder $builder): void
    {
        $builder->macro('onlyNotActivated', function (Builder $builder) {
            return $builder->withoutGlobalScope($this)->where('is_active', 0);
        });
    }