✨ Story 3.2: router php urls
This commit is contained in:
15
index.php
15
index.php
@@ -1,4 +1,15 @@
|
||||
<?php
|
||||
// index.php - Point d'entrée temporaire
|
||||
require_once __DIR__ . '/includes/functions.php';
|
||||
require_once __DIR__ . '/includes/router.php';
|
||||
|
||||
require_once __DIR__ . '/pages/home.php';
|
||||
$router = new Router();
|
||||
|
||||
$router
|
||||
->add('/', 'pages/home.php')
|
||||
->add('/projets', 'pages/projects.php')
|
||||
->add('/projet/{slug}', 'pages/project-single.php')
|
||||
->add('/competences', 'pages/skills.php')
|
||||
->add('/a-propos', 'pages/about.php')
|
||||
->add('/contact', 'pages/contact.php');
|
||||
|
||||
$router->dispatch();
|
||||
Reference in New Issue
Block a user