Browse Source

src: Route get method to controller

master
Elis Hirwing 3 years ago
parent
commit
5173c1603c
Signed by: etu GPG Key ID: D57EFA625C9A925F
  1. 1
      public/index.php
  2. 6
      src/Etu/Controller/Inventory.php

1
public/index.php

@ -11,6 +11,7 @@ $app = new Slim\App();
* Set up routes
*/
$app->get('/inventory/{item}', function (Request $request, Response $response, array $args) {
return $this[InventoryController::class]->get($request, $response, $args);
});
/**

6
src/Etu/Controller/Inventory.php

@ -2,6 +2,8 @@
namespace Etu\Controller;
use Monolog\Logger;
use Psr\Http\Message\ResponseInterface as Response;
use Psr\Http\Message\ServerRequestInterface as Request;
class Inventory
{
@ -12,4 +14,8 @@ class Inventory
{
$this->logger = $logger;
}
public function get(Request $request, Response $response, array $args)
{
}
}

Loading…
Cancel
Save