ifstatement blade laravel code example
Example 1: laravel if syntax
@if (foo)
// do something
@elseif (bar)
// do something else
@else
// do some other thing;
@endif
Example 2: blade php code
@php
//
@endphp
@if (foo)
// do something
@elseif (bar)
// do something else
@else
// do some other thing;
@endif
@php
//
@endphp