mirror of
https://github.com/rico-vz/HeimerdingerLoL.git
synced 2025-12-06 18:20:48 +01:00
fix: update upcoming skins query
update upcoming skins eloquent builder to fit the data the wiki started returning
This commit is contained in:
@@ -9,11 +9,15 @@ 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')
|
||||
$upcomingSkins = Cache::remember('upcomingSkins_home', 60 * 4, static fn() => ChampionSkin::where('availability', 'Upcoming')
|
||||
->where(function ($query) {
|
||||
$query->where('release_date', '0000-00-00')
|
||||
->orWhere('release_date', '>', now());
|
||||
})
|
||||
->orderBy('release_date', 'desc')->get());
|
||||
|
||||
$latestSkins = Cache::remember('latestSkins_home', 60 * 4, static fn () => ChampionSkin::where('release_date', '!=', '0000-00-00')
|
||||
|
||||
$latestSkins = Cache::remember('latestSkins_home', 60 * 4, static fn() => ChampionSkin::where('release_date', '!=', '0000-00-00')
|
||||
->orderBy('release_date', 'desc')->get());
|
||||
|
||||
return view('home', [
|
||||
|
||||
Reference in New Issue
Block a user