与Laravel 4中的图标链接 [英] Link with icon in Laravel 4
本文介绍了与Laravel 4中的图标链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有人可以帮助重写这个,从HTML到Laravel4?
Can someone help to rewrite this, from HTML to Laravel4?
<a href="index.php" ><span><i class="icon-home"></i></span> Home </a>
该页面的路由名称只是'/'。
我知道如何在Laravel编写简单的链接:
The route name for that page is just '/'. I know how to write simple link in Laravel:
{{ HTML::link('/','Home) }}
但是,如何将span类添加为font-awesome图标?
But how can I add the span class with the font-awesome icon?
推荐答案
我只是把链接放在href中。
I'd just put the link in the href.
<a href="{{ url('/') }}"><span><i class="icon-home"></i></span> Home</a>
无需通过Laravel生成其他所有内容。
No need to generate all the rest through Laravel.
这篇关于与Laravel 4中的图标链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文