发送参数url
我正在将值发送到控制器,
echo $html->link('Do this? ',"/item/view/{$form->value('table.id')}");
在控制器端执行此操作,蛋糕只是拾取这样的 id
function view($id = null){
....
}
现在,除了 table.id 之外,我还想发送另一个名为 table2.source 的值...我该怎么做,以便控制器也得到了
function view($id = null, $source=null) ...
类似的东西,但不确定它们将如何到达控制器
I am sending the values to a controller doing this
echo $html->link('Do this? ',"/item/view/{$form->value('table.id')}");
on the controller end cake just pickups the id like this
function view($id = null){
....
}
Now in addition to table.id, I want to send another value called table2.source ...how would I do that so the controller also gets it
function view($id = null, $source=null) ...
something along those lines but not sure how will they get to the controller in first place
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你能不能只将链接网址更改为如下所示:(
在更改视图函数以接受第二个参数之后...)
Can you not just change the link url to something like this:
(After changing the view function to accept the second parameter...)