Birmingham mumbai


Download 1.3 Mb.
Pdf ko'rish
bet67/68
Sana05.01.2022
Hajmi1.3 Mb.
#227543
1   ...   60   61   62   63   64   65   66   67   68
Bog'liq
Laravel 5 Essentials

Standard PHP syntax

Blade syntax

{!! $var !!}



{{ $var }}



@if ($cond) … @endif

If you use the default double braces notation, then variables are escaped. This 

is to protect against XSS vulnerabilities (explained in more detail in Chapter 7



Authentication and Security). If you really need the raw value of variable un-escaped

then you can use single braces, with two exclamation marks inside on each side. You 

should only do this if you trust the value that the variable contains.

Blade also supports all of PHP's major constructs to create loops and conditions:  

@for



@foreach



@while


@if


, and 

@elseif


, allowing you to avoid opening and 

closing the 



 tags everywhere in your templates.




Download 1.3 Mb.

Do'stlaringiz bilan baham:
1   ...   60   61   62   63   64   65   66   67   68




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling