Is it just me or it's my foreach loop is acting weird. I've made a foreach to check if there is a result fetched but if there isn't, I'd be showing a notice/text acknowledging the that there are now results found. The problem here is that,I won't show any text if it doesn't return anything. What seems to be the problem here?
@extends('layouts.master')
@section('content')
{{ Form::open(['url'=>'flight/onewayflightresults']) }}
<div>
<p>Scheduled Flights</p>
</div>
<table class="table table-hover">
<th>Reserve</th>
<th>#</th>
<th>From</th>
<th>To</th>
<th>Departure</th>
<th>Adult</th>
<th>Children</th>
<th>Fare per person</th>
<th>Book Flight</th>
@foreach($result as $row)
@if(count($row) != 0)
<tr>
<td>{{Form::checkbox('reserve', 'value');}}</td>
<td>{{$row -> id}}</td>
<td>{{$row -> destinationfrom}}</td>
<td>{{$row -> destinationto}}</td>
<td>{{$row -> departure}}</td>
<td>{{{$adult}}}</td>
<td>{{{$child}}}</td>
<td>₱{{{$row -> fare}}}</td>
<td>{{ Form::submit(' ✔ ',array('class'=>'btn btn-success')) }}</td>
</tr>
@else
<p class="bg-danger">Sorry but we have no available flight schedule on your desidered date.</p>
@endif
@endforeach
</table>
{{ Form::close() }}
@endsection