Switching from NetBean to Medoo

This commit is contained in:
julien
2026-03-09 00:33:30 +01:00
parent 8d7aba5447
commit 001dc204af
10 changed files with 146 additions and 359 deletions

19
src/Routes/web.php Normal file
View File

@@ -0,0 +1,19 @@
<?php
declare(strict_types=1);
use Slim\App;
use App\Controllers\PostController;
return function (App $app, array $services): void {
$twig = $services['twig'];
$repo = $services['post_repository'];
$controller = new PostController($twig, $repo);
$app->get('/', [$controller, 'index']);
$app->get('/admin', [$controller, 'admin']);
$app->get('/admin/edit/{id}', [$controller, 'form']);
$app->post('/admin/create', [$controller, 'create']);
$app->post('/admin/edit/{id}', [$controller, 'update']);
$app->post('/admin/delete/{id}', [$controller, 'delete']);
};