thinkphp8注解路由解决方案,官方文档有误

[复制链接]
查看302 | 回复0 | 2023-10-8 12:19 | 显示全部楼层 |阅读模式
thinkphp8注解路由解决方案

  1. <?php
  2. namespace app\controller;
  3. use think\annotation\route\Route;
  4. // use think\annotation\Route;
  5. class Address
  6. {
  7.     #[Route("GET","ds/:id",["ext"=>"html","https"=>"1"])]
  8.     public function details($id)
  9.     {
  10.         return 'hi,'.$id;
  11.     }
  12. }
复制代码


您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

UID
1
贡献
387
丢币
38902
主题
4607
回帖
116
注册时间
2018-9-25
最后登录
2024-4-27