[英]Unable to concatenate id with the URL link in the anchor tag
我想将id
与锚标签中的 URL 链接连接起来。 目前,它只路由到 URL 但没有得到id
,所以id
没有与 URL 连接。
[
'label' => 'online ordering link',
'format' => 'raw',
'value'=>'<a href="http://localhost:4200/clientSideDashboard/"'.$model->id.'">Generate Link</a>',
],
[
'label' => 'online ordering link',
'format' => 'raw',
'value'=>'<a href="http://localhost:4200/clientSideDashboard/"'.$model->id.'">Generate Link</a>',
],
永远不会工作。 当您生成的连接值是
<a href="http://localhost:4200/clientSideDashboard/"[model-id]">生成链接
尝试:
[
'label' => 'online ordering link',
'format' => 'raw',
'value'=>'<a href="http://localhost:4200/clientSideDashboard/'.$model->id.'">Generate Link</a>',
],
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.