问题
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.
回答1:
I call them "blade template variables."
回答2:
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.
来源:https://stackoverflow.com/questions/27675853/what-do-you-call-variables-that-have-double-curly-braces-in-laravel