Reputation: 5649
In html
I can use <span>
tag inside form label like this:
<label for="name" class="class-name">Name:<span class="required"></span></label>
Using Laravel Blade, the code for label is like this:
{!! Form::label('name','Name:',['class'=>'class-name']) !!}
How can I use <span>
inside form label using blade template?
Upvotes: 8
Views: 6400
Reputation: 35098
Just set the 4th parameter of Form::label to false which is escape_html
= false.
{!! Form::label('name','Name: <span class="required"></span>', [], false) !!}
Upvotes: 8
Reputation: 168
Try this one code:
{!! Html::decode(Form::label('name','Name: <span class="required"></span>')) !!}
Upvotes: 9