<?php

namespace App\Http\Controllers\Admin;

use App\Http\Controllers\Controller;
use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Request;

/**
 * Legacy routes under /admin/home redirect to PageContent editor (`admin.pages.index.*`).
 */
class HomePageController extends Controller
{
    public function edit(Request $request): RedirectResponse
    {
        return redirect()->route('admin.pages.index.edit', $request->query());
    }

    public function update(Request $request): RedirectResponse
    {
        return redirect()
            ->route('admin.pages.index.edit')
            ->with('info', 'Home page editing has moved to Website Content → Pages → Home.');
    }
}
