mirror of
https://github.com/rico-vz/HeimerdingerLoL.git
synced 2025-12-06 10:10:48 +01:00
feat: champ information, style improvement
This commit is contained in:
@@ -51,6 +51,12 @@ class ChampionController extends Controller
|
||||
return $champion->load('skins', 'lanes');
|
||||
});
|
||||
|
||||
$splashColor = Cache::remember('championSplashColorCache' . $champion->slug, 60 * 60 * 24, function () use ($champion) {
|
||||
return getAverageColorFromImageUrl($champion->getChampionImageAttribute());
|
||||
});
|
||||
|
||||
$champion->splash_color = $splashColor;
|
||||
|
||||
return view('champions.show', compact('champion'));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user