diff --git a/src/Foundation/Search/ProductSearch.php b/src/Foundation/Search/ProductSearch.php index 4507cc9b..315216b4 100644 --- a/src/Foundation/Search/ProductSearch.php +++ b/src/Foundation/Search/ProductSearch.php @@ -134,10 +134,10 @@ public function withinChannels(Channel ...$channels): self $channelIds = collect($channels)->pluck('id'); $this->productQuery->whereHas('channels', function ($query) use ($channelIds) { - $query->whereIn('id', $channelIds); + $query->whereIn('channel_id', $channelIds); }); $this->masterProductQuery->whereHas('channels', function ($query) use ($channelIds) { - $query->whereIn('id', $channelIds); + $query->whereIn('channel_id', $channelIds); }); return $this;