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