I am learning the Slim3 framework to create apis rest / full, I found several examples, for example in routes.php
$app->group('/v1', function () {
$this->group('/auth', function () {
$this->map(['GET', 'POST'], '/login', 'App\controllers\AuthController:login');
$this->map(['GET', 'POST'], '/logout', 'App\controllers\AuthController:logout');
$this->map(['GET', 'POST'], '/signup', 'App\controllers\AuthController:signup');
});
$this->group('/events', function () {
$this->get('', 'App\controllers\EventController:getEvents');
$this->post('', 'App\controllers\EventController:createEvent');
$this->group('/{eventId}', function () {
$this->get('', 'App\controllers\EventController:getEvent');
$this->put('', 'App\controllers\EventController:updateEvent');
$this->delete('', 'App\controllers\EventController:deleteEvent');
});
});
});
But the controllers are not like creating them, I'm a bit lost with this framework. By the way I searched and found the following Slim 3 Very simple REST Skeleton
I downloaded it unzipped and created the necessary tables, but it does not work, I would say that it has to be installed in some way that I do not know.