een centraal login systeem voor het werken met jwt tokens
| app | ||
| config | ||
| public | ||
| routes | ||
| storage/logs | ||
| README.md | ||
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'];