LARAVLE 4 - 부트 스트랩 글리핀 콘
-
20-12-2019 - |
문제
누구나 내
에Bootstrap glyphicon
를 어떻게 넣을 수 있습니까?
{{ link_to_route('post.create', 'New' ) }}
나는 'new'직전에 글리프콘을 보여주고 싶습니다. 그리고 나는 그것을하는 방법을 모른다.
해결책
이 작업을 시도하십시오.
<a href="{{ route('post.create') }}">
<i class="glyphicon glyphicon-plus"></i>
<span>New</span>
</a>
. 다른 팁
이와 같은 도우미가 있습니다 :
function icon_link_to_route($icon, $route, $title = null, $parameters = array(), $attributes = array())
{
$url = route($route, $parameters);
$title = (is_null($title)) ? $url : e($title);
$attributes = HTML::attributes($attributes);
$title = '<span class="glyphicon glyphicon-'.e($icon).'"></span>' . $title;
return '<a href="'.$url.'"'.$attributes.'>'.$title.'</a>';
}
. 제휴하지 않습니다 StackOverflow