laravel if syntax 1

laravel if syntax

@if (foo)
  // do something
@elseif (bar)
  // do something else
@else
  // do some other thing;
@endif

Here is what the above code is Doing:
1. If foo is true, do something.
2. If foo is false, but bar is true, do something else.
3. If neither foo nor bar is true, do some other thing.

Similar Posts