Grundlegender Aufbau erstellt.

This commit is contained in:
2021-03-25 21:48:25 +01:00
parent a93c767142
commit 5c49997eba
7 changed files with 120 additions and 1 deletions
@@ -0,0 +1,22 @@
<?php /** @noinspection PhpUnused */
namespace TorstenHettstedt\TimekeepingApi\Controller;
use Slim\Psr7\Response;
use Slim\Psr7\Request;
class HelloWorldController
{
/** @noinspection PhpUnusedParameterInspection */
public function read(Request $request, Response $response, $args): Response
{
$payload = json_encode('Hallo World');
$response->getBody()->write($payload);
return $response
->withHeader('Content-Type', 'application/json')
->withStatus(200);
}
}