blade show variable code example
Example 1: laravel 5.4 forelse
@forelse ($users as $user)
<li>{{ $user->name }}</li>
@empty
<p>No users</p>
@endforelse
Example 2: blade php code
@php
//
@endphp
@forelse ($users as $user)
<li>{{ $user->name }}</li>
@empty
<p>No users</p>
@endforelse
@php
//
@endphp