From 4cacc94240944ff316104bfd1b5e8e00fad14517 Mon Sep 17 00:00:00 2001 From: Daniel Weipert Date: Fri, 14 Jan 2022 18:21:36 +0100 Subject: Add Artworks, Votes and better routing --- src/Controller/Home.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/Controller/Home.php') diff --git a/src/Controller/Home.php b/src/Controller/Home.php index 511b89b..1c1500c 100644 --- a/src/Controller/Home.php +++ b/src/Controller/Home.php @@ -14,9 +14,18 @@ class Home echo "
";
     $c && var_dump(
       array_map(fn ($item) => [$item->key, $item->value], $c->meta->toArray()),
+      array_map(fn ($item) => " Votes: " . $item->getVotesTotal(), $c->artworks->toArray()),
+      array_map(fn ($item) => $item->value, $c->votes->toArray()),
+      'Votes: ' . $c->getVotesTotal(),
     );
 
-    return Template::render('home.twig');
+    return Template::render('home.twig', [
+      'fields' => [
+	'name' => 'meta[name]',
+	'converted mana cost' => 'meta[cmc]',
+	'is uno reverse' => 'meta[is_uno_reverse]',
+      ],
+    ]);
   }
 }
 
-- 
cgit v1.2.3