Yes that query is fubar.
You want to get product filters that has the filter_id of 2 or 3.
In SQL I would do something like this
SELECT product_id
FROM product_filter
WHERE filter_id IN (2, 4);
In Eloquent the same query would look something like this
ProducFilter::whereIn('filter_id', [2, 4])->get();
And to make it more dynamic you just excehange the [2, 4] with a variable passed into the request something like
public function(Request $request)
{
$filters = $request->filters;
$products = ProductFilter::whereIn('filter_id', $filters])->get():
}
You should of course validate the request->filters before using it in your query
