idk anymore! please put the dog down (me)!

This commit is contained in:
2026-04-19 19:22:38 +02:00
commit b6a258b3cf
16 changed files with 324 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
<?php
namespace Controllers;
use PDO;
use src\View;
use src\ViewModels\HomeData;
class HomeController
{
public function __construct(
private PDO $db
) {}
public function index(): void
{
$data = new HomeData(
pageTitle: 'Welcome to Pawra',
posts: $this->db->query("SELECT * FROM posts LIMIT 10")->fetchAll()
);
View::render('home', $data);
}
}