A reader question about subqueries across multiple database connections led to an interesting deep dive into how Laravel compiles queries. It turns out whereHas and whereIn behave very differently here.
masteringlaravel.io/daily/2026-02-19-do-eloquent-subqueries-work-across-database-connections
Back