request->input('user', 'Hyperf'); $method = $this->request->getMethod(); $this->validate($this->request->all(), [ 'username' => 'required', 'password' => 'required', ]); return [ 'method' => $method, 'message' => "Hello {$user}.", ]; } public function upload(ResponseInterface $response) { return [ 'method' => 'upload', ]; } }