How to escape a key / keys in Blade?

1

In Blade, the key characters (or key) are intended to add the purpose of printing the content. It is complicated for echo .

But I was wondering if I really needed to display content, containing the exact value of the keys, what could I do?

For example, if I needed to display the content below, how could I "escape" those characters in the Blade?

{{ $variavel }} Isso vai ser compilado.

{{ Essa parte tem que ser exibida literalmente no HTML }}
    
asked by anonymous 28.06.2016 / 16:41

1 answer

4

Add an @ to write curly brackets literally

@{{ $var }}

will display literally

@{{ $var }}

If I'm not mistaken, in Laravel smaller than 5.1, I did not have this feature so we did with HTMLEntities. But in tests performed by the AP itself, it was found that the feature is available in version 4.2 of Laravel.

    
28.06.2016 / 16:47