Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I want to create a resourceful link with Laravel. Normally I just use the {{ link_to_route('Yadayadayada.route', 'LinkName', $params }}

But in this case I am using a Template with this layout:

<a href="index.html">
     <i class="icon-dashboard"></i>
     <span class="menu-text"> Dashboard </span>
</a>

That means that inside the anchor tag, is as well a <i>-Tag and a <span>-Tag. Is it possible to use the {{ link_to_route }}-Method, without having to change the layout of the Template?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
578 views
Welcome To Ask or Share your Answers For Others

1 Answer

Use URL::route() to get just a link:

<a href="{{ URL::route('user/profile/', $params) }}">
     <i class="icon-dashboard"></i>
     <span class="menu-text"> Dashboard </span>
</a>

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...