How to put an HTML code on a label in Laravel?

Asked

Viewed 377 times

7

When I try to do that:

{{ Form::label("nomecampo", "Descrição<em>*</em>", array("class" => "entrada")) }}

The tag enters inside the tag but is not interpreted correctly. See:

<label class="entrada" for="nomecampo">Descrição<em>*</em></label>
  • Explain yourself better. Until now, what I could understand, the Blade is working as it should.

1 answer

7


You should use the HTML::Decode() method for this purpose, try as follows:

{{ HTML::decode(Form::label("nomecampo", "Descrição<em>*</em>", array("class" => "entrada")) ) }};

Browser other questions tagged

You are not signed in. Login or sign up in order to post.