bookedTimes are already showing my problem is how can I sort the items from the highest booked to the lest booked. Any answers and suggestions are welcome. Thank you in advance.
<div class="row">
@if(!empty($Service) && count($Service))
@foreach($Service['result'] as $value)
@foreach($value as $val)
<?php
$arrange = array($val['bookedTimes']);
arsort($arrange);
foreach($arrange as $x => $x_value) {
echo $x_value;
}
?>
@endforeach
@endforeach
@else
<div class="col-lg-12 col-md-12"><h4>Data Not Found! </h4> </div>
@endif
</div>
This is the booked time data that is need to be in Descending Order

orderByin your controller and then pass it to your view.