johnnyfittizio johnnyfittizio - 6 months ago 27
HTML Question

Link with icon in Laravel 4

Can someone help to rewrite this, from HTML to Laravel4?

<a href="index.php" ><span><i class="icon-home"></i></span> Home </a>


The route name for that page is just '/'.
I know how to write simple link in Laravel:

{{ HTML::link('/','Home) }}


But how can I add the span class with the font-awesome icon?

Answer

I'd just put the link in the href.

<a href="{{ url('/') }}"><span><i class="icon-home"></i></span> Home</a>

No need to generate all the rest through Laravel.