Files
2026-02-28 10:38:33 +08:00

46 lines
964 B
PHP

<?php
declare(strict_types=1);
/**
* This file is part of Hyperf.
*
* @link https://www.hyperf.io
* @document https://hyperf.wiki
* @contact group@hyperf.io
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/
namespace App\Controller;
use Hyperf\HttpServer\Annotation\Controller;
use Hyperf\HttpServer\Annotation\RequestMapping;
#[Controller]
class IndexController extends AbstractController
{
// #[RequestMapping('/', methods: ['GET', 'POST'])]
public function index()
{
$method = $this->request->getMethod();
return [
'method' => $method,
'message' => "Datahub App",
];
}
#[RequestMapping('/favicon.ico', methods: ['GET', 'POST'])]
public function favicon()
{
return [];
}
#[RequestMapping('/health', methods: 'GET')]
public function health()
{
return [
'message' => "System status ok",
];
}
}