From 165fabf13c0bf03560457a9b897338f6f9089fc8 Mon Sep 17 00:00:00 2001 From: paoloar77 Date: Mon, 22 Jul 2024 12:21:09 +0200 Subject: [PATCH] aa --- app/CustomFuncPao.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/CustomFuncPao.php b/app/CustomFuncPao.php index 1fa90c7d..2bd4c2ed 100644 --- a/app/CustomFuncPao.php +++ b/app/CustomFuncPao.php @@ -682,7 +682,8 @@ function showDettOrdini() $str = "Ordini Woocommerce:" . PHP_EOL . '
'; try { - $orders = AppOrder::all(); + // sort DataOra desc + $orders = AppOrder::all()->sortByDesc('DataOra'); // Show the fields of the orders foreach ($orders as $order) {