Closed sam2332 closed 10 years ago
There currently is not, but you could do a manual if
statement, like:
$app->subdomain('www', function($request) {
// main marketing site
});
if (!in_array($request->subdomain(), [false, 'www', 'admin']) {
$app->path('/', function($request) {
select_user_by_subdomain_here($request->subdomain());
// etc...
}
}
That's the advantage of using routes directly in the code instead of a routing config file - you basically get unlimited flexibility, and can use plain PHP wherever you want to handle flow control.
wonderful!
is there some code i can use to make it so my users get a subdomain on my server? like subdomain param or something?