<?php

namespace App\Http\Controllers;

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

class PageController extends Controller
{
    public function show(Page $page)
    {
        // Check if page is published
        if (!$page->is_published) {
            abort(404);
        }

        return view('pages.show', compact('page'));
    }
}
