een centraal login systeem voor het werken met jwt tokens
Find a file
2025-10-29 10:53:41 +01:00
app Initial commit 2025-10-29 10:53:41 +01:00
config Initial commit 2025-10-29 10:53:41 +01:00
public Initial commit 2025-10-29 10:53:41 +01:00
routes Initial commit 2025-10-29 10:53:41 +01:00
storage/logs Initial commit 2025-10-29 10:53:41 +01:00
README.md Initial commit 2025-10-29 10:53:41 +01: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'];