Search code examples
htmllaravellaravel-bladelaravelcollective

Use <span> inside Form Label in Blade template


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?


Solution

  • Try this one code:

    {!! Html::decode(Form::label('name','Name: <span class="required"></span>')) !!}