diff --git a/routes/web.php b/routes/web.php index ea49b102..6a35c37e 100644 --- a/routes/web.php +++ b/routes/web.php @@ -96,9 +96,9 @@ Route::group(['middleware' => ['role:admin']], function() { })->get(); $customers = $bookings->groupBy(function($item) { return $item->user_id; - })->sortBy(function($item){ + })->sortByDesc(function($item){ return count($item); - }); + }, SORT_NUMERIC); echo "