📜  url中间的laravel可选路由参数 - PHP代码示例

📅  最后修改于: 2022-03-11 14:54:45.939000             🧑  作者: Mango

代码示例1
No. Optional parameters need to go to the end of the route,
otherwise Router would not know how to match URLs to routes.
What you implemented already is the correct way of doing that:

get('things/entities', 'MyController@doSomething');
get('things/{id}/entities', 'MyController@doSomething');