-
app/Http/Controllers/HomeController.php
Open in GitHubuse App\Models\User; use Illuminate\Support\Facades\Cache; class HomeController extends Controller { public function show() { $communityMembers = Cache::remember('communityMembers', now()->addMinutes(5), function () { return User::withCounts() ->hasActivity() ->whereNull('banned_at') ->inRandomOrder() ->take(100) ->get() ->chunk(20); }); // } // }