Is there a reason Laravel Query Builder does not support INTERSECT operator? I'm currently developing a project where I have to build complex queries for a massive filtration system, and the idea is to break them apart into smaller query services that are easily tested, and then group them where needed. But for that, I need the INTERSECT operator.
Right now, I am using UNION, and then doing a str_replace('union', 'intersect', $query->toSql()) and using that string to create a new Query Builder instance.
Is there a reason Laravel Query Builder does not support INTERSECT operator? I'm currently developing a project where I have to build complex queries for a massive filtration system, and the idea is to break them apart into smaller query services that are easily tested, and then group them where needed. But for that, I need the INTERSECT operator.
Right now, I am using UNION, and then doing a
str_replace('union', 'intersect', $query->toSql())
and using that string to create a new Query Builder instance.