* @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}.", ]; } }