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) {