Initial backend folder structure and setup
This commit is contained in:
14
app/Controllers/ProjectController.php
Normal file
14
app/Controllers/ProjectController.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
require_once __DIR__ . '/../Models/Project.php';
|
||||
|
||||
class ProjectController {
|
||||
private $project;
|
||||
|
||||
public function __construct($db) {
|
||||
$this->project = new Project($db);
|
||||
}
|
||||
|
||||
public function getAllProjects() {
|
||||
return $this->project->fetchAll();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user