<?php

namespace App\Http\Controllers;

/*
 * ServiceController — детальная страница услуги.
 * GET /services/{slug}
 * 404 если услуга не найдена или неактивна.
 */

use App\Models\Service;
use Illuminate\View\View;

class ServiceController extends Controller
{
    public function show(string $slug): View
    {
        $service = Service::active()->where('slug', $slug)->firstOrFail();

        return view('pages.service', compact('service'));
    }
}
