diff options
author | Daniel Weipert <code@drogueronin.de> | 2022-01-10 20:29:04 +0100 |
---|---|---|
committer | Daniel Weipert <code@drogueronin.de> | 2022-01-10 20:29:04 +0100 |
commit | a319f3a419790925bed539ba141038c72a83e70f (patch) | |
tree | dfb24183cc693863df733e190dbbc6da93bb82e5 /src/Controller/Home.php |
Initial commit
Diffstat (limited to 'src/Controller/Home.php')
-rw-r--r-- | src/Controller/Home.php | 22 |
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'); + } +} + |