使用资源路由遇到的BUG

浏览:336 发布日期:2019/03/27 分类:ThinkPHP5专区 关键字: 路由 资源路由
版本 5.1最新
假设路由Route::resource('rule','admin/rule')假设域名 aaa.com

正常情况下 admin/rule/index 访问地址应该是
aaa.com/rule.html
在html模板上使用 {:url('admin/rule/index')}
得到的链接地址是
aaa.com/admin/rule/index.html
造成无法链接到目的地.
不过,在aaa.com/rule.html页面上的链接却是 aaa.com/rule.html 可以正确打开的

正常路由Route::get('admin', 'admin/index/index');在html模板上使用{:url('admin/index/index')}
得到地址是
aaa.com/admin.html

你们遇到此问题了吗?还是我不会使用呢
最佳答案
评论( 相关
后面还有条评论,点击查看>>