1
I have a controller called CardController
with various methods within it, however I need to pass some data for 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
Confusing. Has how to explain the problem with text, not being comments in the code?
– Woss
I tried to explain better in the text
– Igor Oliveira