I wonder how can we organise the simple routes below when they get bigger when the app grows.
// Configure your routes
$app->set('routes', function (RouteCollector $r) {
$r->map('/', null, function () {
return new Response('Hello, world');
});
$r->map('/hello/{name}', null, function ($name) {
return new Response('Hello, ' . $name . '!');
});
});
For instance, with Slim framework, I can do this when we have routes to be grouped and stored in different files,
$app = new Slim();
require '../app/routes/session.php';
require '../app/routes/member.php';
require '../app/routes/admin.php';
$app->run();
url: http://www.slimframework.com/2011/09/24/how-to-organize-a-large-slim-framework-application.html
Can this be done with Nice?