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

汪汪一只貓
TA貢獻(xiàn)1898條經(jīng)驗(yàn) 獲得超8個贊
應(yīng)該需要完全匹配Route::rule('a$', 'index/Index/a');
Route::rule('a/:type$', 'index/Index/b');
- 1 回答
- 0 關(guān)注
- 527 瀏覽
添加回答
舉報(bào)
0/150
提交
取消