如何在Laravel Form :: label中添加标签(跨度小)? [英] How to add a tag (span, small) to Laravel Form::label?
本文介绍了如何在Laravel Form :: label中添加标签(跨度小)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在Laravel 4.1中,我想回声:
In Laravel 4.1, I want to echo:
<label for="name">Name <small>required</small></label>
这不起作用:
{{ Form::label('name','Name <small>required</small>') }}
会自动转换为代码文本……
are automatically converted to code text…
有没有办法或者我必须跳过Form :: label并手动进行?
Is there a way or do I have to skip Form::label and do it manually?
推荐答案
如果您想在Laravel的另一个标签内使用Html标签,则应使用HTML :: decode.
If you want to use a Html tag inside another by Laravel one you should use HTML::decode.
正确的代码:
{{ HTML::decode(Form::label('name','Name <small>required</small>')) }}
这篇关于如何在Laravel Form :: label中添加标签(跨度小)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文