diff options
author | Jonathan Tschanter <jmtw@tutanota.de> | 2022-01-21 00:14:34 +0100 |
---|---|---|
committer | Jonathan Tschanter <jmtw@tutanota.de> | 2022-01-21 00:14:34 +0100 |
commit | 2bde1b0660585e16116fbd12c86b53e886b6f3be (patch) | |
tree | 8c23fbad83e8b947c60a50b7af6be2c8b0d4867a /src/Router.php | |
parent | c2b0ebcdbb23a38a31b4d8c9e39f2a2be4cc862b (diff) |
Add first layout with simplecss
Diffstat (limited to 'src/Router.php')
-rw-r--r-- | src/Router.php | 13 |
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); |