🔍 Laravel devs, be careful when using count() with groupBy!
If you’re working with queries that include groupBy and having, you should know that the ->count() method can return incorrect results. 😬
That’s because count() ignores the grouping and having filters when building the final query.
❌ Incorrect usage...
sidneycosta.hashnode.dev1 min read