mirror of
https://github.com/rico-vz/HeimerdingerLoL.git
synced 2025-12-06 10:10:48 +01:00
feat(controllers): optimize caching and view data passing
- Refactored the ChampionController, ChampionSkinController, HomeController, SaleController, SummonerEmoteController, and SummonerIconController to use arrow functions for cache callbacks. - Updated the view data passing in the ChampionController, ChampionSkinController, HomeController, PostsController, SaleController, SummonerEmoteController, and SummonerIconController to use associative arrays instead of compact(). - Removed unused imports from web.php.
This commit is contained in:
@@ -16,7 +16,7 @@ class SummonerIconController extends Controller
|
||||
->paginate(72)
|
||||
->appends(request()->query());
|
||||
|
||||
return view('icons.index', compact('icons'));
|
||||
return view('icons.index', ['icons' => $icons]);
|
||||
}
|
||||
|
||||
public function store(Request $request)
|
||||
@@ -40,7 +40,7 @@ class SummonerIconController extends Controller
|
||||
{
|
||||
$icon = $summonerIcon;
|
||||
|
||||
return view('icons.show', compact('icon'));
|
||||
return view('icons.show', ['icon' => $icon]);
|
||||
}
|
||||
|
||||
public function update(Request $request, SummonerIcon $summonerIcon)
|
||||
|
||||
Reference in New Issue
Block a user