From 8ee685e4a568a91fa2db15ce2e03adbfa048239a Mon Sep 17 00:00:00 2001 From: paoloar77 Date: Thu, 13 Jun 2024 09:08:18 +0200 Subject: [PATCH] aa --- app/CustomFuncPao.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/CustomFuncPao.php b/app/CustomFuncPao.php index a71a2e7b..3c9087f8 100644 --- a/app/CustomFuncPao.php +++ b/app/CustomFuncPao.php @@ -241,11 +241,13 @@ function showOrdini() { $str = "Ordini"; - - $orders = Orderdetail::orderBy('id', 'desc')->take(2)->get(); try { + $orders = Orderdetail::orderBy('id', 'desc') + ->take(2) + ->get(); + // Show the fields of the orders foreach ($orders as $order) { $str .= "Ordine: "; @@ -264,7 +266,7 @@ function showOrdini1() { $str = "Ordini"; - + $orders = Order::orderBy('DataOra', 'desc')->take(2)->get(); try {