I've got the following snippet successfully routing subdomain request. I'm looking for a way where I can detect the subdomain and do some quick logic to assign a value to a global variable depending on the subdomain. Where could I do this?
Route::group(array('domain' => '{username}.murch.co'), function() {
Route::controller('checkout', 'CheckoutController');
Route::get('/', 'UserController@getProfile');
});
I'd like to do something like
Route::group(array('domain' => '{username}.murch.co'), function() {
$var = "dog".$username;
View::share('var', $var);
Route::controller('checkout', 'CheckoutController');
Route::get('/', 'UserController@getProfile');
});