From 2bde1b0660585e16116fbd12c86b53e886b6f3be Mon Sep 17 00:00:00 2001 From: Jonathan Tschanter Date: Fri, 21 Jan 2022 00:14:34 +0100 Subject: Add first layout with simplecss --- src/Router.php | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'src/Router.php') 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); -- cgit v1.2.3