hyperfk8s/app/Controller/Index/LearningController.php

28 lines
619 B
PHP
Executable File

<?php
declare(strict_types=1);
/**
* This file is part of the youyao/admin-api.
*
* (c) youyao <info@nuancebiotech.cn>
* This source file is subject to the license under the project that is bundled.
*/
namespace App\Controller\Index;
use Hyperf\Di\Annotation\Inject;
use App\Controller\AbstractController;
class LearningController extends AbstractController
{
public function index()
{
$user = $this->request->input('user', 'Hyperf');
$method = $this->request->getMethod();
return [
'method' => $method,
'message' => "Hello {$user}.",
];
}
}