src/AttachableTrait.php
public static function scopeWithoutAttach(Builder $query, $attaches, $type = 'filename')
    {
        $attaches = (new static)->prepareAttaches($attaches);

        return $query->whereDoesntHave('attaches', function ($query) use ($type, $attaches) {
            $query->whereIn($type, $attaches);
        });
    }
public static function scopeWithoutAttach(Builder $query, $attaches, $type = 'filename')
    {
        $attaches = (new static)->prepareAttaches($attaches);

        return $query->whereDoesntHave('attaches', function ($query) use ($type, $attaches) {
            $query->whereIn($type, $attaches);
        });
    }
{@inheritdoc}