johnnyfittizio johnnyfittizio - 1 year ago 95
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 Source

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.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download