Files
FendxPHP/app/Controller/HomeController.php

38 lines
885 B
PHP
Raw Permalink Normal View History

<?php
declare(strict_types=1);
namespace App\Controller;
use Fendx\Core\Context\Context;
class HomeController
{
public function index(): array
{
return [
'code' => 200,
'message' => 'Welcome to FendxPHP Framework',
'data' => [
'framework' => 'FendxPHP',
'version' => '1.0.0',
'traceId' => Context::getTraceId(),
'timestamp' => date('Y-m-d H:i:s'),
]
];
}
public function health(): array
{
return [
'code' => 200,
'message' => 'Health check passed',
'data' => [
'status' => 'healthy',
'php_version' => PHP_VERSION,
'memory_usage' => memory_get_usage(true),
'traceId' => Context::getTraceId(),
]
];
}
}