Solved using a filter:
Route::filter('set_account', function($route, $request) {
Config::set('app.account', $route->getParameter('account'));
});
Route::group(array(
'domain' => '{account}.example.com',
'before' => 'set_account',
), function() {
//Rest of route groups and routes, with the account available via Config::get('app.account')
});
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community