Champion::orderBy('name')->get()); $roles = Cache::remember('championsRolesCache', $eightHoursInSeconds, static fn() => ChampionRoles::orderBy('champion_name')->get()); return view('champions.index', ['champions' => $champions, 'roles' => $roles]); } /** * Display the specified resource. */ public function show(Champion $champion) { $threeDaysInSeconds = 60 * 60 * 24 * 3; $champion = Cache::remember('championShowCache' . $champion->slug, $threeDaysInSeconds, static fn() => $champion->load('streamers', 'skins', 'lanes')); $streamers = $champion->load('streamers')->streamers; return view('champions.show', ['champion' => $champion, 'streamers' => $streamers]); } }