summaryrefslogtreecommitdiff
path: root/src/Controller/Home.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/Controller/Home.php')
-rw-r--r--src/Controller/Home.php22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/Controller/Home.php b/src/Controller/Home.php
new file mode 100644
index 0000000..511b89b
--- /dev/null
+++ b/src/Controller/Home.php
@@ -0,0 +1,22 @@
+<?php
+
+namespace Elements\Controller;
+
+use Elements\DB;
+use Elements\Model\Card;
+use Elements\Template;
+
+class Home
+{
+ public static function index()
+ {
+ $c = DB::$entityManager->getRepository(Card::class)->findOneBy([], ['id' => 'DESC']);
+ echo "<pre>";
+ $c && var_dump(
+ array_map(fn ($item) => [$item->key, $item->value], $c->meta->toArray()),
+ );
+
+ return Template::render('home.twig');
+ }
+}
+