You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
423 B

  1. <?php
  2. declare(strict_types=1);
  3. namespace App\Controller;
  4. use Hyperf\HttpServer\Contract\RequestInterface;
  5. use Hyperf\HttpServer\Annotation\AutoController;
  6. /**
  7. * @AutoController()
  8. * Class TestController
  9. * @package App\Controller
  10. */
  11. class TestController extends AbstractController
  12. {
  13. public function index(RequestInterface $request)
  14. {
  15. $id = $request->input('id',2);
  16. return (string)$id;
  17. }
  18. }