Skip to content

String Literals ​

You can use string literals and concatenate them with other strings. You can use double or single quotes for strings. Example:

textwire
{{ "Hello" + 'World!' }}

When you print a string, it will be automatically escaped. If you want to print a string without escaping it, you can use the raw embedding with {!! and !!}. Example:

textwire
{!! "<h1>Test</h1>" !!}

Auto-escaped on output ​

All strings are automatically HTML-escaped when printed to prevent XSS attacks.

Use {!! !!} for unescaped output ​

Use the {!! myVar !!} when you need to output HTML, XML, JSON without escaping.

Concatenation with + ​

Use the + operator to join strings together.

Quote flexibility ​

Single and double quotes are interchangeable for string literals.

Escaping ​

Use a backslash to insert special characters inside strings. See Escaping.