Files
datahub/backend/app/Controller/IndexController.php
T

46 lines
965 B
PHP
Raw Normal View History

2025-11-05 16:34:40 +08:00
<?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;
2025-11-12 09:35:20 +08:00
use Hyperf\HttpServer\Annotation\Controller;
use Hyperf\HttpServer\Annotation\RequestMapping;
#[Controller]
2025-11-05 16:34:40 +08:00
class IndexController extends AbstractController
{
2025-11-12 09:35:20 +08:00
// #[RequestMapping('/', methods: ['GET', 'POST'])]
2025-11-05 16:34:40 +08:00
public function index()
{
$method = $this->request->getMethod();
return [
'method' => $method,
2025-11-12 09:35:20 +08:00
'message' => "Dataflow App",
];
}
#[RequestMapping('/favicon.ico', methods: ['GET', 'POST'])]
public function favicon()
{
return [];
}
#[RequestMapping('/health', methods: 'GET')]
public function health()
{
return [
'message' => "System status ok",
2025-11-05 16:34:40 +08:00
];
}
}