blade template if statement code example
Example 1: laravel if syntax
@if (foo)
// do something
@elseif (bar)
// do something else
@else
// do some other thing;
@endif
Example 2: laravel 5.4 forelse
@forelse ($users as $user)
<li>{{ $user->name }}</li>
@empty
<p>No users</p>
@endforelse