T1000
T1000

Reputation: 948

How to add a tag (span, small) to Laravel Form::label?

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?

Upvotes: 2

Views: 3117

Answers (2)

Raju Mondal
Raju Mondal

Reputation: 11

Try this:

{!! Html::decode(Form::label('name','Name <small>required</small>')) !!}

Upvotes: 0

Reza Babaei
Reza Babaei

Reputation: 1075

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>')) }}

Upvotes: 2

Related Questions