Add bootstrap factory for framework loading

This commit is contained in:
Maarten 2024-11-26 14:20:46 +01:00
parent ab5fa6d69e
commit 83bc1a1661
11 changed files with 254 additions and 45 deletions

View file

@ -13,7 +13,7 @@ class HtmlRender extends Render
public function render(): void
{
$basePath = $_SERVER['DOCUMENT_ROOT'];
$viewsPath = $basePath . '/../resources/views/' . str_replace('.', '/', $this->view) . '.php';
$viewsPath = app()->resourcePath('views/' . str_replace('.', '/', $this->view) . '.php');
if (file_exists($viewsPath)) {
extract($this->data);