@verbatim directive in blade template of laravel

Many of you may not know about this.

Blade echo syntax {{ }} is also used in many JavaScript frameworks . Vue.js is prime example of it

We use @{{ }} symbols to prevent blade from parsing it which outputs the content stripping the @ symbol.

But there are cases, where we repeatedly use JavaScript echo which makes writing @ in front of every blade echos tedious.

For example:

<div id="app">
Name of javascript @{{ name }}
Type of appliation @{{ type }}
<!-- And few more like these -->
</div>

So, the solution here is to use another blade directive, a directive called @verbatim.

It totally neglects the blades echo directives inside of it.

<div>
@verbatim
Name of javascript {{ name }}
Type of appliation {{ type }}
<!-- and few more like these -->
@endverbatim
</div>
Like what you read? Give Suman Shrestha a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.