mirror of
https://github.com/rico-vz/HeimerdingerLoL.git
synced 2025-12-06 10:10:48 +01:00
- Added a new method `roadmap` to HomeController for displaying the roadmap view. - Created a new Blade template `roadmap.blade.php` for the roadmap page. - Defined a route `/roadmap` to access the roadmap feature.
35 lines
910 B
PHP
35 lines
910 B
PHP
<?php
|
|
|
|
namespace App\Http\Controllers;
|
|
|
|
use App\Models\ChampionSkin;
|
|
use Illuminate\Support\Facades\Cache;
|
|
|
|
class HomeController extends Controller
|
|
{
|
|
public function index()
|
|
{
|
|
$upcomingSkins = Cache::remember('upcomingSkins_home', 60 * 4, static fn () => ChampionSkin::where('availability', 'Upcoming')
|
|
->where('release_date', '0000-00-00')
|
|
->orderBy('release_date', 'desc')->get());
|
|
|
|
$latestSkins = Cache::remember('latestSkins_home', 60 * 4, static fn () => ChampionSkin::where('release_date', '!=', '0000-00-00')
|
|
->orderBy('release_date', 'desc')->get());
|
|
|
|
return view('home', [
|
|
'latestSkins' => $latestSkins,
|
|
'upcomingSkins' => $upcomingSkins,
|
|
]);
|
|
}
|
|
|
|
public function support()
|
|
{
|
|
return view('support');
|
|
}
|
|
|
|
public function roadmap()
|
|
{
|
|
return view('roadmap');
|
|
}
|
|
}
|