在我嵌套的 restful 控制器中,我的 show 方法应该接收两个这样的值
public function show($postId, $commentsId)
{
// code
}
生成的url应该是这样的
http://localhost/posts/1/comments/1
现在我的查询是:我需要通过我的路由调用发送那些 twu 值
我这样使用:
<a href="{{ URL::route('posts.comments.show', value1, value2) }}"> <h3> Click </h3></a>
但它给出了这样的错误
Symfony \ Component \ Routing \ Exception \ InvalidParameterException
Parameter "dcoms" for route "debates.dcoms.show" must match "[^/]++" ("" given) to generate a corresponding URL.