diff --git a/src/Models/Campaign.php b/src/Models/Campaign.php index 06dab787..ff023fe7 100644 --- a/src/Models/Campaign.php +++ b/src/Models/Campaign.php @@ -38,7 +38,7 @@ public function getActiveSubscriberCountAttribute(): int ->whereNull('unsubscribed_at') ->when(!$this->send_to_all, function (Builder $query) { $query->whereHas('segments', function (Builder $subQuery) { - $subQuery->whereIn('id', $this->segments->pluck('id')); + $subQuery->whereIn('segments.id', $this->segments->pluck('id')); }); }) ->count();