Route::controller
在Laravel 5.3过时, 现在,我想我的设计路线,但我不知道我能做到这一点没有Route::controller
,因为我不想定义Route::get
为每个路由和我想要处理我的控制器中的参数。设计路线::控制器
例如,这些都是我的路线:
http://domain.com/images/10/pic.jpg (in this route I need 10 as $file_id and pic.jpg as $file_name)
http://domain.com/images/crop/200x100/10/pic.jpg (in this route I need crop as $action, 200x100 as $size, 10 as $file_id and pic.jpg as $file_name)
我怎么能做到这一点不Route::controller
?
你可以使用'路线::资源()' –
@RimonKhan感谢,但资源创建CRUD方法,我不不需要这些方法,我想用我自己的方法 – MajAfy