兼容5.0与5.1的注解路由

浏览:717 发布日期:2018/12/19 分类:系统代码
注解路由类
要求
ThinkPHP >= 5.0

安装

composer require ke/buildrouter

使用

当TP设置为调试模式时(也就是app_debug为true)时每次请求都会生成route/build_route.php


部署时你应该使用 php think ke-buildrouter 生成路由表

注解格式

与官方的差不多,目前只支持 @route('rule', 'method') 必须输入method,否则不识别

后续可能支持option参数的设置?


https://github.com/wdaglb/ke-buildrouter
评论( 相关
后面还有条评论,点击查看>>