summaryrefslogtreecommitdiff
path: root/src/Controller
diff options
context:
space:
mode:
Diffstat (limited to 'src/Controller')
-rw-r--r--src/Controller/Home.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Controller/Home.php b/src/Controller/Home.php
index 7eda5ee..36879e0 100644
--- a/src/Controller/Home.php
+++ b/src/Controller/Home.php
@@ -30,7 +30,11 @@ class Home
public static function dashboard()
{
- return Template::render('dashboard.twig', []);
+ $cards = DB::$entityManager->getRepository(Card::class)->findAll();
+ $cardOfTheDay = $cards[array_rand($cards)];
+ return Template::render('dashboard.twig', [
+ 'cardOfTheDay' => $cardOfTheDay,
+ ]);
}
}