It might be nice to propose grouping routes by domains, as Symfony, Laravel or Lumen already does.
$app->group(['domain' => 'www.example.com'], function($request, $response, $args) {
});
$app->group(['domain' => 'subdomain.example.com'], function($request, $response, $args) {
});
I don't think that belongs in Slim personally. A "sub-domain" inherently means a different domain, which means different context, which means it should be an entire different application. It's not because Symfony or Laravel does it that we should do it either.
Most helpful comment
I don't think that belongs in Slim personally. A "sub-domain" inherently means a different domain, which means different context, which means it should be an entire different application. It's not because Symfony or Laravel does it that we should do it either.