我的代碼如下:Route::rule('a', 'index/Index/a');Route::rule('a/:type', 'index/Index/b');我期望第一個路由表達式到地址a,第二個路由表達式到地址b。實際是都會到地址a。
1 回答

拉風(fēng)的咖菲貓
TA貢獻1995條經(jīng)驗 獲得超2個贊
應(yīng)該需要完全匹配Route::rule('a$', 'index/Index/a');
Route::rule('a/:type$', 'index/Index/b');
- 1 回答
- 0 關(guān)注
- 489 瀏覽
添加回答
舉報
0/150
提交
取消