mirror of
https://github.com/rico-vz/HeimerdingerLoL.git
synced 2025-12-06 18:20:48 +01:00
- Added a new method in HomeController to handle the support page. - Created a new blade template for the support page with donation options.
30 lines
835 B
PHP
30 lines
835 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');
|
|
}
|
|
}
|