<?php
/// file: app/Controllers/ServiceController.php

declare(strict_types=1);

namespace App\Controllers;

use App\Core\Controller;
use App\Core\Request;
use App\Core\Response;
use App\Helpers\Seo;
use App\Models\Service;

final class ServiceController extends Controller
{
    public function index(Request $request): Response
    {
        $services = Service::published();
        $html = $this->view('services/index', [
            'meta' => Seo::page('services'),
            'page' => 'services',
            'services' => $services,
        ], 'layouts/base');
        return Response::html($html);
    }
}
