Danusorn Danusorn - 7 months ago 20
HTML Question

Php laravel how to use blade in echo

in my echo statement like this

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>";


in link attribute i need to use {{ URL::to('index/edit/$tmpd') }}

because if i same. it more confuse to link from different page.

how can i edit my code.

Answer

I hope you get the point here

<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>