找回密码
 立即注册
查看: 160|回复: 0

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

[复制链接]

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

[复制链接]

UID
1
贡献
117
丢币
38886
主题
4598
回帖
116
注册时间
2018-9-25
最后登录
2023-11-26
admin

UID
1
贡献
117
丢币
38886
主题
4598
回帖
116
注册时间
2018-9-25
最后登录
2023-11-26
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. }
复制代码


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

本版积分规则

QQ|网站地图|Archiver|自丢网 | 粤ICP备17166275号

GMT+8, 2023-12-1 05:00

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表