loop in query template in laravel blade code example
Example 1: forelse laravel
@forelse ($users as $user)
<li>{{ $user->name }}</li>
@empty
<p>No users</p>
@endforelse
Example 2: laravel guest blade
//LARAVEL - BLADE:
@guest
// The user is not authenticated...
@endguest
@auth
// The user is authenticated...
@endauth