条件分岐ディレクティブ

  Laravel

@if

条件が成立する場合に、trueとなる。
@if ( 条件 )

@endif

@if( 条件 )

@else

@endif

@if ( 条件 )

@elseif ( 条件 )

@else

@endif

@unless

条件が非成立となる場合に、trueとなる。
@unless ( 条件 )

@endunless

@empty

変数が空の場合に、trueとなる。
@empty ( 変数 )

@endempty

@isset

変数が定義済みの場合に、trueとなる。
@isset ( 変数 )

@endisset

LEAVE A COMMENT