@if (count($errors) > 0)
@foreach ($errors->all() as $error)
- {{ $error }}
@endforeach
@endif
@if(!empty($filtered))
@else
@endif
@php
function latestpayment($reg)
{
$res = \DB::table('payment')
->where('Mpesa_Account', '=', $reg)
->orderBy('Date_received', 'DESC')
->select('Date_received')
->first();
if (!$res) {
return "Check payment";
} else {
return $res->Date_received;
}
}
@endphp
@if(!empty($students))
@else
No Data Available
@endif
@stop