I don’t think I @forelsewas around with Laravel 3. I could be wrong. I know that it was deleted at some point. Now you need to use the standard @ifand @foreach.
@if (empty($result))
<tr><td>No name match</td></tr>
@else
@foreach ($result as $data)
<tr><td> $data->name </td></tr>
@endforeach
@endif
UPDATE
As Antonio noted, it was returned and is available in v4.2.7 + , so you will need to update it if you want.
source
share