Initial backend folder structure and setup

This commit is contained in:
MosLaptop\Not.Reda
2025-06-13 12:32:36 +02:00
parent 504f6ef3e2
commit 2ccfce135d
6 changed files with 70 additions and 0 deletions

16
app/Models/Project.php Normal file
View File

@@ -0,0 +1,16 @@
<?php
class Project {
private $conn;
private $table = "projects";
public function __construct($db) {
$this->conn = $db;
}
public function fetchAll() {
$query = "SELECT * FROM " . $this->table;
$stmt = $this->conn->prepare($query);
$stmt->execute();
return $stmt->fetchAll(PDO::FETCH_ASSOC);
}
}