愚蠢简单:如何在laravel刀片引擎中打印{{Str}}?

1.Expected output:

{{_STR_}}

2.My input :

 echo ('{{_STR_}}');

3.How to print the short code {{}} in laravel blade engine?

4.However, I want to print the

 {{_STR_}}

without using the echo . any way to do it more clearly and simpler in blade engine?

thanks.

If I understand you correctly, then according to docs:

If you need to display a string that is wrapped in curly braces, you may escape the Blade behavior by prefixing your text with an @ symbol:

@{{ This will not be processed by Blade }}

So for your example:

@{{_STR_}}

You can escape the Blade behaviour by prefixing with @:

@{{_STR_}}

This will tell Blade to output literal {{_STR_}} instead of looking for a variable.