<?php

namespace App\Http\Controllers;

use App\Models\ContentPage;
use Illuminate\Contracts\View\View;

class ContentPageController extends Controller
{
    public function show(string $slug): View
    {
        $page = ContentPage::query()
            ->published()
            ->where('slug', $slug)
            ->firstOrFail();

        return view('content-pages.show', [
            'page' => $page,
        ]);
    }
}
