$app->get('/admin/barcode/print', function ($request, $response, $args) { $args["sku"] = urldecode($request->getQueryParams()["sku"]); return $this->renderer->render($response, 'barcode-print.phtml', $args); }); $app->get('/admin/report', function ($request, $response, $args) { $guardians = InventoryItemGuardian::whereNull('return_date')->get(); $args["guardians"] = $guardians; return $this->renderer->render($response, 'report.phtml', $args); }); $app->get('/admin/identities', function ($request, $response, $args) { $identities = Identity::all(); $args["identities"] = $identities; return $this->renderer->render($response, 'identities.phtml', $args); }); $app->get('/admin/identity/{id}', function ($request, $response, $args) { $identity = Identity::findOrFail($args["id"]); $args["identity"] = $identity; return $this->renderer->render($response, 'identity.phtml', $args); }); $app->get('/admin/inventory', function ($request, $response, $args) { $items = InventoryItem::all(); $args["items"] = $items; return $this->renderer->render($response, 'inventory.phtml', $args); }); $app->get('/admin/inventory/{id}', function ($request, $response, $args) { $item = InventoryItem::findOrFail($args["id"]); $args["item"] = $item; return $this->renderer->render($response, 'item.phtml', $args); }); $app->get('/api/v1/identities', function ($request, $response, $args) { $names = [];