dengan Laravel yang ditugaskan menugaskan nama generik

$users = User::withCount([
    'posts', 
    'comments', 
    'comments as approved_comments_count' => function ($query) {
        $query->where('approved', 1);
	}
])->get();
Lokesh003