else if loop in laravel code example
Example 1: for else laravel
@foreach ($users as $user)
<p>This is user {{ $user->id }}</p>
@endforeach
@forelse ($users as $user)
<li>{{ $user->name }}</li>
@empty
<p>No users</p>
@endforelse
Example 2: if else statement in laravel blade
@if ($dummy == 1) we have 1 record@elseif ($dummy ==10) we have 10 record@else No record found.@endif