warmwhisky
warmwhisky

Reputation: 489

What do you call variables that have double curly braces in laravel

I'm trying to find out a name for code that is surrounded by double curly braces in Laravel.

Do they even have a name. Are they known as double curly braces in all languages.

The reason I want to know is that I still do not quite understand the scope of them. I know a lot of languages use them, but what is their name?

For instance; if I want to know why double curly brace variables don't work in a Laravel @include; how do I find out?

Another example is that I cannot add a tag on stack exchange for double-curly-braces because it does not exist.

Searching Google brings up nothing. Searching stack exchange is the same.

Upvotes: 1

Views: 1819

Answers (2)

Jake Pucan
Jake Pucan

Reputation: 656

Behind the scene of {{ $foo }} is <?php echo e($foo); ?>. I accidentally found out when I'm searching a particular variable in my project using PhpStorm and it shows me the compiled view files of Laravel w/c resides in storage/framework/views.

Upvotes: 0

Ben Harold
Ben Harold

Reputation: 6432

I call them "blade template variables."

Upvotes: 2

Related Questions