From f2aff7518be55da0fd250e04a4bfc1bbbd5a3d0a Mon Sep 17 00:00:00 2001 From: Calvin Morrison Date: Tue, 2 Aug 2022 14:36:09 -0400 Subject: data model, query and storage works, frontend display basic last report --- routes/web.php | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'routes') diff --git a/routes/web.php b/routes/web.php index b130397..9396c11 100644 --- a/routes/web.php +++ b/routes/web.php @@ -1,6 +1,9 @@ selectRaw("id, value, currency_id, relative_id, max(`created_at`) as created_at") + ->groupByRaw('currency_id') + ->get(); + + $rates = new Collection(); + foreach($ratesRaw as $r) { + $rates->push(Rates::find($r->id)); + } + return view('welcome', ['currencies' => Currency::all(), 'rates' => $rates]); }); -- cgit v1.2.3