custom routing engine that redirects incoming traffic to the associated class -> function. it also includes a logger that logs a error in the chosen data directory
Find a file
2025-10-28 11:39:09 +00:00
app deleted the includes for some inrelevant files 2025-10-28 11:28:03 +01:00
config initial commit 2025-10-28 09:23:38 +01:00
public initial commit 2025-10-28 09:23:38 +01:00
routes deleted some inrelevant files 2025-10-28 11:16:50 +01:00
storage/logs initial commit 2025-10-28 09:23:38 +01:00
README.md README.md bijwerken 2025-10-28 11:39:09 +00:00

by default the .htdocs file cannot route the traffic to index.php this needs to be changed in the Apache config file to make it work:

<Directory "C:/xampp/htdocs/public">    # route to the public folder
    Options Indexes FollowSymLinks
    AllowOverride All                   # allow override
    Require all granted
</Directory>

the costum routes can be set in the /routes/api.php file in the following format:

'$METHOD $URL' => [$class::class => $function_as_a_string]

for example:

'GET /user/get' => [UserController::class => 'get_user'];

if you need to encode a id or dynamic data into the url you can use the {} tag to route all matching parameters

for example:

'GET /user/image/{id}' => [UserController::class => 'serve_image'];