Press "Enter" to skip to content

@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:

 

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

It totally neglects the blades echo directives inside of it.

 

Be First to Comment

    Leave a Reply

    Your email address will not be published.