From 309892c7fb0630cc4afcb87a89ceac6024da1879 Mon Sep 17 00:00:00 2001 From: paoloar77 Date: Wed, 22 May 2024 14:27:32 +0200 Subject: [PATCH] ordini view --- routes/web.php | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/routes/web.php b/routes/web.php index f3204b00..290a6f37 100644 --- a/routes/web.php +++ b/routes/web.php @@ -1860,9 +1860,23 @@ Route::get('/autori_test', function () { } }); +function getvalstr($mystr, $value) { + return " " . $mystr . ": " . $value; + +} + Route::get('/test6', function () { $orders = Order::all(); - dd($orders); + + // Show the fields of the orders + foreach ($orders as $order) { + echo "Ordine: "; + getvalstr("Id", $order->id); + getvalstr("DataOra", $order->DataOra); + getvalstr("Totale", $order->Totale); + } + + }); Route::get('/test7/{name}', function ($name) {