summaryrefslogtreecommitdiff
path: root/src/Router.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/Router.php')
-rw-r--r--src/Router.php13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/Router.php b/src/Router.php
index 5635d5c..aad6122 100644
--- a/src/Router.php
+++ b/src/Router.php
@@ -27,9 +27,16 @@ class Router
$response = new Response();
$this->routes = new RouteCollection();
- $this->addRoute('GET', '/', [Home::class, 'index']);
- $this->addRoute('GET', '/card/{id}', [Card::class, 'get']);
- $this->addRoute('POST', '/card/add', [Card::class, 'add']);
+ $this->addRoute('GET', '/', [Home::class, 'index']);
+ $this->addRoute('GET', '/dashboard', [Home::class, 'dashboard']);
+
+ // card
+ $this->addRoute('GET', '/card/list', [Card::class, 'listCards']);
+ $this->addRoute('GET', '/card/add', [Card::class, 'addCard']);
+ $this->addRoute('GET', '/card/{id}', [Card::class, 'displayCard']);
+ $this->addRoute('GET', '/card/{id}/edit', [Card::class, 'editCard']);
+ $this->addRoute('POST', '/card/add', [Card::class, 'add']);
+ $this->addRoute('POST', '/card/{id}/edit', [Card::class, 'edit']);
$context = new RequestContext();
$context->fromRequest($request);