有没有办法让通配符路由?但只限于特定的名称。Laravel的通配符路线?
例如,
我有很多途径,导致在同一个地方:
/archive/gallery/1/picture/1
/masters/gallery/1/picture/1
/browse/gallery/1/picture/1
这些都加载了相同的图片,但是这将是巨大的,如果我可以做这样的事情:
Route::get('{???}/gallery/{galleryId}/picture/{pictureId}', array(
'as'=>'picture',
'uses'=>'[email protected]'
));
但只能使用存档或主人或浏览为通配符。
所以你有三个资源,但是你想让通用路由器具有通配符? – carousel