Php laravel如何在回声中使用刀片

时间:2016-05-03 00:39:12

标签: php html laravel

在我的echo语句中

echo "<a href='../edit/$tmpd'><img src='/images/pjdict/edit.png' width='42' height='42' style='margin-right:20px'  data-toggle='tooltip' title='Edit'></a>";
链接属性中的

我需要使用{{URL :: to(&#39; index / edit / $ tmpd&#39;)}}

因为如果我一样。它更混淆来自不同页面的链接。

如何编辑我的代码。

1 个答案:

答案 0 :(得分:2)

我希望你明白这一点

<a href="{{ url('edit', $tmpd) }}"><img src='/images/pjdict/edit.png' width='42' height='42' style='margin-right:20px'  data-toggle='tooltip' title='Edit'></a>