@if(!empty($schoolsList))
@php ($primary = 0) @php ($secondary = 0)

Primary

@foreach($schoolsList as $school) @if($school['phase_of_education'] == "Primary" && $primary < 10) @php ($primary++)

{!! $school['school_name'] !!} {!! $school['postcode'] !!}

{!! $school['provision_type'] !!} {!! substr($school['distance'], 0, 5) !!} miles

@if($school['rating'] == "Outstanding") {!! $school['rating'] !!} @elseif($school['rating'] == "Good") {!! $school['rating'] !!} @elseif($school['rating'] == "Requires") {!! $school['rating'] !!} @elseif($school['rating'] == "Serious") {!! $school['rating'] !!} @endif

@endif @endforeach @if($primary == 0)

Primary schools are not available in this area.

@endif

Secondary

@foreach($schoolsList as $school) @if($school['phase_of_education'] == "Secondary" && $secondary < 10) @php ($secondary++)

{!! $school['school_name'] !!}

{!! $school['provision_type'] !!} {!! substr($school['distance'], 0, 5) !!} miles

@if($school['rating'] == "Outstanding") {!! $school['rating'] !!} @elseif($school['rating'] == "Good") {!! $school['rating'] !!} @elseif($school['rating'] == "Requires") {!! $school['rating'] !!} @elseif($school['rating'] == "Serious") {!! $school['rating'] !!} @endif

@endif @endforeach @if($secondary == 0)

Secondary schools are not available in this area.

@endif
@else

No data Available

@endif