I have a controller called CardController
with several methods inside it, but I need to pass some data to these methods via parameter.
Currently I can only access the methods directly as the second example
$app->group('/v1', function() {
/**
* Dentro de v1, o recurso /card
*/
$this->group('/card', function($app) {
$this->get('', function (Request $request, Response $response) use ($app){
//chamar a funcao getcard do controller aqui passando parametros
});
$this->post('', '\App\v1\Controllers\CardController:getcard'); //só consigo chamar assim