The site has flip-flopped on the snow effect every winter (add it, remove it, repeat), meaning a PR round-trip each time. Instead, restore the winter.js/is-land assets and gate them behind a new admin-toggleable setting so the effect can be switched on/off from /admin/settings without touching code. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0113BVPXDpEk9HPEqXvSG2WQ
32 lines
744 B
PHP
32 lines
744 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Http\Controllers\Admin;
|
|
|
|
use App\Http\Controllers\Controller;
|
|
use App\Models\Setting;
|
|
use Illuminate\Http\RedirectResponse;
|
|
use Illuminate\Http\Request;
|
|
use Illuminate\View\View;
|
|
|
|
class SettingsController extends Controller
|
|
{
|
|
public function show(): View
|
|
{
|
|
$settings = Setting::first();
|
|
|
|
return view('admin.settings.show', [
|
|
'settings' => $settings,
|
|
]);
|
|
}
|
|
|
|
public function update(Request $request): RedirectResponse
|
|
{
|
|
$settings = Setting::firstOrNew();
|
|
$settings->winter_effect_enabled = $request->boolean('winter_effect_enabled');
|
|
$settings->save();
|
|
|
|
return redirect()->route('admin.settings.show');
|
|
}
|
|
}
|