【发布时间】:2014-02-15 02:34:53
【问题描述】:
有没有办法拥有通配符路线?但只有特定的名称。
例如。
我有许多通往同一个地方的路线:
/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'=>'PictureController@getPicture'
));
但只能使用存档或母版或浏览作为通配符。
【问题讨论】:
-
所以你有三个资源,但你想用通配符使路由器通用?