问题
In Laravel 4.1, I want to echo:
<label for="name">Name <small>required</small></label>
This doesn't work:
{{ Form::label('name','Name <small>required</small>') }}
are automatically converted to code text…
Is there a way or do I have to skip Form::label and do it manually?
回答1:
If you want to use a Html tag inside another by Laravel one you should use HTML::decode.
Correct code :
{{ HTML::decode(Form::label('name','Name <small>required</small>')) }}
来源:https://stackoverflow.com/questions/22259216/how-to-add-a-tag-span-small-to-laravel-formlabel