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