From 16773d61fe9f89cc52e071436082c8ac175b8217 Mon Sep 17 00:00:00 2001 From: Roberto Guido Date: Tue, 17 Dec 2024 12:51:53 +0100 Subject: [PATCH] fix in gestione luoghi consegna --- code/app/Delivery.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/app/Delivery.php b/code/app/Delivery.php index a22fd2c7..f3777bbb 100644 --- a/code/app/Delivery.php +++ b/code/app/Delivery.php @@ -49,7 +49,7 @@ private static function sortByUserName($bookings) private static function sortByPlace($bookings) { - usort($bookings, function ($a, $b) { + return $bookings->sortBy([function ($a, $b) { $a_place = $a->shipping_place; $b_place = $b->shipping_place; @@ -74,7 +74,7 @@ private static function sortByPlace($bookings) } return $ret; - }); + }]); return $bookings; }