This commit is contained in:
paoloar77
2024-06-13 09:08:18 +02:00
parent 0ee373b2ce
commit 8ee685e4a5

View File

@@ -241,11 +241,13 @@ function showOrdini()
{ {
$str = "Ordini"; $str = "Ordini";
$orders = Orderdetail::orderBy('id', 'desc')->take(2)->get();
try { try {
$orders = Orderdetail::orderBy('id', 'desc')
->take(2)
->get();
// Show the fields of the orders // Show the fields of the orders
foreach ($orders as $order) { foreach ($orders as $order) {
$str .= "Ordine: "; $str .= "Ordine: ";
@@ -264,7 +266,7 @@ function showOrdini1()
{ {
$str = "Ordini"; $str = "Ordini";
$orders = Order::orderBy('DataOra', 'desc')->take(2)->get(); $orders = Order::orderBy('DataOra', 'desc')->take(2)->get();
try { try {