Level 3
Is it always the same subquery? Would a model scope be enough?
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Anyone has an Eloquent macro that has been used extensively without issues?
Basically I want to be able to use whereExists by passing a subquery instead of having to use whereId.
User::where('name', 'me')->whereExists(
User::whereNull('column')
)
Please or to participate in this conversation.