<?php if(): ?> blade code example
Example 1: use if in laravel blade
@if($user->status =='active')
<td>{{ $user->name }}</td>
@else
<td> Guest </td>
@endif
Example 2: 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