Laravel - Blade Templates - If Statements

You may construct if statements using the @if, @elseif, @else, and @endif directives. These directives function identically to their PHP counterparts:

    @if (count($records) === 1)
        I have one record!
    @elseif (count($records) > 1)
        I have multiple records!
        I don't have any records!

For convenience, Blade also provides an @unless directive:

    @unless (Auth::check())
        You are not signed in.

In addition to the conditional directives already discussed, the @isset and @empty directives may be used as convenient shortcuts for their respective PHP functions:

        // $records is defined and is not null...
        // $records is "empty"...