Released in Laravel 8.57: a shorter way to write whereHas() with a simple condition inside.
// Previous approach:
User::whereHas('posts', function ($query) {
$query->where('published_at', '>', now());
})->get();
// Updated approach:
User::whereRelation('posts', 'published_at', '>', now())->get();