From 9d0863d65fc3f16abcde074c59a7543790e1f0db Mon Sep 17 00:00:00 2001 From: Bruno Eckhardt Date: Fri, 22 May 2026 12:24:06 +0200 Subject: [PATCH] fixes --- init.php | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/init.php b/init.php index 7eef973..f155a4c 100644 --- a/init.php +++ b/init.php @@ -845,7 +845,7 @@ use MVC\Core\Controller; use MVC\Classes\Api; class ApiController extends Controller { - public static function (){ + public static function get(){ return Api::jsonResponse([ 'data' => 'DummyData', ]); @@ -913,15 +913,11 @@ class TestController extends Controller { } PHP; -// --- VIEWS --- -$files['WEBROOT/src/MVC/View/home.php'] = "

Dashboard

Willkommen in deinem neuen MVC-System mit integriertem Header.

"; -$files['WEBROOT/src/MVC/View/test1.php'] = "

Service 1

"; -$files['WEBROOT/src/MVC/View/test2.php'] = "

System Check

"; - // --- API --- -$files['WEBROOT/api/v1/get.php'] = <<<'PHP +$files['WEBROOT/api/v1/get.php'] = <<<'PHP' get()); -catch (\Exception $e) { - Api::jsonResponse(§e->getMessage(), 404); + echo ($api->get()); +} catch (\Exception $e) { + echo ($e->getMessage()); } - PHP; + +// --- VIEWS --- +$files['WEBROOT/src/MVC/View/home.php'] = "

Dashboard

Willkommen in deinem neuen MVC-System mit integriertem Header.

"; +$files['WEBROOT/src/MVC/View/test1.php'] = "

Service 1

"; +$files['WEBROOT/src/MVC/View/test2.php'] = "

System Check

"; + // --- ENTRY POINT --- $files['WEBROOT/index.php'] = <<<'PHP'