1分钟部署网站📞AI智能客服,大模型训练自有数据,简单好用,有效降低客服成本 广告
## 快捷路由 快捷路由允许你快速给控制器注册路由,并且针对不同的请求类型可以设置方法前缀,例如: ~~~ // 给User控制器设置快捷路由 Route::controller('user','index/User'); ~~~ User控制器定义如下: ~~~ <?php namespace app\index\controller; class User { public function getInfo() { } public function getPhone() { } public function postInfo() { } public function putInfo() { } public function deleteInfo() { } } ~~~ 我们可以通过下面的URL访问 ~~~ get http://localhost/user/info get http://localhost/user/phone post http://localhost/user/info put http://localhost/user/info delete http://localhost/user/info ~~~