<?php

namespace App\Http\Controllers;

use App\Models\LandingPage;
use Illuminate\Http\Request;

class LandingPagePreviewController extends Controller
{
    public function show(int $id)
    {
        $landingPage = LandingPage::with(['product', 'sections'])->findOrFail($id);
        
        return view('landing.preview', [
            'page' => $landingPage,
            'product' => $landingPage->product,
            'sections' => $landingPage->sections,
        ]);
    }
}
