I need help getting the parameter id
at the moment the URI is called, passing it to container
.
Follow the code below:
$this->get('/{id}', function($request, $response, $args) {
return $response->withJson($this->get('singleSelect'));
});
$this->appContainer['singleSelect'] = function ($id) {
return $this->singleSelect($id);
};
public function singleSelect($id) {
return $id;
}
Thank you in advance.