Laravel 5: Blades – outputting received data in blade

Blades: outputting received data in blade

Blade templates allow for a numerous way to output received data.

This page’s content is also related to this content.
Blade echo statement: standard

By default, Blade {{ }} statements are automatically sent through PHP’s htmlentities function to prevent XSS attacks.
Blade echo statement takes any PHP data, like time() etc.

Blade echo statement: ternary statement

Blade echo statement: no htmlentities

Plying nicely with JS frameworks

Sometimes you may want to output something totally untouched by Laravel, e.g. to allow curly braces to be displayed (JS frameworks sometimes use them).
For that, you use @ in front:

If you have plenty of @ signs to put into code, why not use @verbatim directive?

Blade comments

Almost like HTML comments, but you will NOT see them in HTML code in browser.