request->input('user', 'Hyperf'); $method = $this->request->getMethod(); return [ 'method' => $method, 'message' => floatval(2.00), ]; } public function example(Filesystem $filesystem) { $file = $this->request->file('upload'); var_dump($file);die; $fileContent = file_get_contents($file->getRealPath()); var_dump($fileContent);die; $stream = fopen($file->getRealPath(),'r+'); $filesystem->writeStream('uplaods/'.$file->getClientFilename(),$stream); fclose($stream); } }