mirror of
https://github.com/rico-vz/HeimerdingerLoL.git
synced 2025-12-06 18:20:48 +01:00
Apply fixes from StyleCI
This commit is contained in:
@@ -48,10 +48,10 @@ class ChampionController extends Controller
|
||||
$threeDaysInSeconds = 60 * 60 * 24 * 3;
|
||||
$sixMonthsInSeconds = 60 * 60 * 24 * 30 * 6;
|
||||
|
||||
$champion = Cache::remember('championShowCache' . $champion->slug, $threeDaysInSeconds, static fn () => $champion->load('skins', 'lanes'));
|
||||
$champion = Cache::remember('championShowCache'.$champion->slug, $threeDaysInSeconds, static fn () => $champion->load('skins', 'lanes'));
|
||||
|
||||
$splashColor = Cache::remember(
|
||||
'championSplashColorCache' . $champion->slug,
|
||||
'championSplashColorCache'.$champion->slug,
|
||||
$sixMonthsInSeconds,
|
||||
static fn () => getAverageColorFromImageUrl($champion->getChampionImageAttribute())
|
||||
);
|
||||
|
||||
@@ -55,13 +55,13 @@ class ChampionSkinController extends Controller
|
||||
public function show(ChampionSkin $championSkin)
|
||||
{
|
||||
$skin = Cache::remember(
|
||||
'championSkinShowCache' . $championSkin->slug,
|
||||
'championSkinShowCache'.$championSkin->slug,
|
||||
60 * 60 * 48,
|
||||
static fn () => $championSkin->load('champion', 'chromas')
|
||||
);
|
||||
|
||||
$splashColor = Cache::remember(
|
||||
'championSkinSplashColorCache' . $championSkin->slug,
|
||||
'championSkinSplashColorCache'.$championSkin->slug,
|
||||
60 * 60 * 120,
|
||||
static fn () => getAverageColorFromImageUrl($championSkin->getSkinImageAttribute())
|
||||
);
|
||||
|
||||
@@ -28,7 +28,7 @@ class ContactSubmissionController extends Controller
|
||||
'title' => "{$contactSubmission->category->humanReadable()} - {$contactSubmission->subject}",
|
||||
'description' => $descriptionContent,
|
||||
'color' => '#ff8a4c',
|
||||
]
|
||||
],
|
||||
]);
|
||||
|
||||
return redirect()->route('contact.index')->with('success', 'Your message has been sent!');
|
||||
|
||||
@@ -6,7 +6,6 @@ use App\Models\Champion;
|
||||
use App\Models\ChampionSkin;
|
||||
use App\Models\SummonerIcon;
|
||||
use Illuminate\Support\Facades\Cache;
|
||||
|
||||
use Spatie\Sheets\Facades\Sheets;
|
||||
|
||||
class HTMLSitemapController extends Controller
|
||||
@@ -20,7 +19,6 @@ class HTMLSitemapController extends Controller
|
||||
$icons = Cache::remember('sitemap_iconsCache', $twentyHoursInSeconds, fn () => SummonerIcon::orderBy('title')->get());
|
||||
$posts = Sheets::all()->sortByDesc('date');
|
||||
|
||||
|
||||
return view('sitemap.index', compact('champions', 'skins', 'icons', 'posts'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use CreativeCrafts\Paginate\Facades\Paginate;
|
||||
use Spatie\Sheets\Facades\Sheets;
|
||||
use Spatie\Sheets\Sheet;
|
||||
use CreativeCrafts\Paginate\Facades\Paginate;
|
||||
|
||||
class PostsController extends Controller
|
||||
{
|
||||
|
||||
@@ -14,6 +14,7 @@ class SaleController extends Controller
|
||||
true
|
||||
);
|
||||
$salesData = array_filter($shopData, static fn ($collection) => $collection['path'] === '/event/sales');
|
||||
|
||||
return reset($salesData)['dynamicCollection']['discountedProductsByProductType'] ?? [];
|
||||
});
|
||||
|
||||
|
||||
@@ -9,13 +9,13 @@ class ContactSubmissionRequest extends FormRequest
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'name' => ['required', 'max:254'],
|
||||
'email' => ['required', 'email', 'max:254'],
|
||||
'discord' => ['nullable', 'min:2', 'max:35'],
|
||||
'name' => ['required', 'max:254'],
|
||||
'email' => ['required', 'email', 'max:254'],
|
||||
'discord' => ['nullable', 'min:2', 'max:35'],
|
||||
'category' => ['required', 'in:question,advertising,bug_report,feedback,other'],
|
||||
'subject' => ['required', 'max:254'],
|
||||
'message' => ['required', 'unique:contact_submissions', 'max:3500'],
|
||||
'h-captcha-response' => 'required|HCaptcha'
|
||||
'subject' => ['required', 'max:254'],
|
||||
'message' => ['required', 'unique:contact_submissions', 'max:3500'],
|
||||
'h-captcha-response' => 'required|HCaptcha',
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user