猿问

无法将 id 与锚标记中的 URL 链接连接起来

我想将id与锚标记中的 URL 链接连接起来。目前,它仅路由到 URL,但未获取id,因此id不会与 URL 连接。


[

    'label' => 'online ordering link',

    'format' => 'raw',

    'value'=>'<a href="http://localhost:4200/clientSideDashboard/"'.$model->id.'">Generate Link</a>',

],


元芳怎么了
浏览 90回答 1
1回答

翻过高山走不出你

[&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'label' => 'online ordering link',&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'format' => 'raw',&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'value'=>'<a href="http://localhost:4200/clientSideDashboard/"'.$model->id.'">Generate Link</a>',],永远不会工作。当您生成的连接值是<a href="http://localhost:4200/clientSideDashboard/"[model-id]">生成链接尝试 :[&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'label' => 'online ordering link',&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'format' => 'raw',&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'value'=>'<a href="http://localhost:4200/clientSideDashboard/'.$model->id.'">Generate Link</a>',],
随时随地看视频慕课网APP
我要回答