Liquid in section
Interpolation
Interpolation is a way to print out the dynamic data inside the HTML structure.
Evaluate
The engine is built in Javascript, In some situations, it's useful to embed logic code into your views. You can use the blade @js directive to execute your logic code. It works similarly to <?php
and ?>
in PHP programming language.
Conditionals
You may construct if statements using the @if
, @elseif
, @else
, and @endif
directives. These directives function identically to their Javascript counterparts:
For convenience, Blade also provides an @unless
directive:
Switch case
Switch statements can be constructed using the @switch
, @case
, @break
, @default
and @endswitch
directives:
For Loop
In addition to conditional statements, Engine provides simple directives for working with Javascript's loop structures. Again, each of these directives functions identically to their Javascript counterparts:
While loop
If you love LayoutHub, could you consider posting an review? That would be awesome and really help us to grow our business, here is the link.
Last updated