Route::get(‘api/:id‘,‘api/index/banner‘);
访问:http://project.com/api/12.05结果:12
修改后的路由
Route::get(‘api/:id‘,‘api/index/banner‘,[],[‘id‘=>‘[0-9.]+‘]);
结果就能正常获取
tp5.1 路由获取参数问题总结
原文:http://blog.51cto.com/11016194/2338371