diff --git a/app/Http/Controllers/CommunityController.php b/app/Http/Controllers/CommunityController.php index 397762c74..94a92247e 100644 --- a/app/Http/Controllers/CommunityController.php +++ b/app/Http/Controllers/CommunityController.php @@ -17,13 +17,7 @@ public function index(UserFilters $filters) return redirect('community?country_iso='.$country_iso); } - $ambassadors = User::role('ambassador') - ->filter($filters) - ->whereNotNull('avatar_path') - ->whereNotNull('bio') - ->whereNotNull('city_id') // Ensure city is set - ->with('city') // Load city details - ->get(); + $ambassadors = User::role('ambassador')->filter($filters)->whereNotNull('avatar_path')->whereNotNull('bio')->paginate(10); $teachers = User::role('leading teacher')->where('approved', 1)->with('city')->get();