Can I group my routes in Silex just as Slim framework?
For instance, in Slim,
// API group
$app->group('/api', function () use ($app) {
// Admin group
$app->group('/admin', function () use ($app) {
// Get book with ID
$app->get('/books/:id', function ($id) use ($app) {
// Update book identified by $id.
});
// Update book with ID
$app->put('/books/:id', function ($id) use ($app) {
// Update book identified by $id.
});
// Delete book with ID
$app->delete('/books/:id', function ($id) use ($app) {
// Update book identified by $id.
});
});
});
Can I group my routes in Silex just as Slim framework?
For instance, in Slim,
Is it possible with Silex?