31 lines
752 B
PHP
31 lines
752 B
PHP
<?php
|
|
declare(strict_types=1);
|
|
/**
|
|
*
|
|
* This is my open source code, please do not use it for commercial applications.
|
|
*
|
|
* For the full copyright and license information,
|
|
* please view the LICENSE file that was distributed with this source code
|
|
*
|
|
* @author Yuandong<837215079@qq.com>
|
|
* @link https://github.com/gzydong/hyperf-chat
|
|
*/
|
|
|
|
namespace App\Controller;
|
|
|
|
use Hyperf\HttpServer\Contract\ResponseInterface;
|
|
|
|
class IndexController extends AbstractController
|
|
{
|
|
public function index(ResponseInterface $response)
|
|
{
|
|
$user = $this->request->input('user', 'Hyperf');
|
|
$method = $this->request->getMethod();
|
|
|
|
return [
|
|
'method' => $method,
|
|
'message' => "Hello {$user}.",
|
|
];
|
|
}
|
|
}
|