Here is my route:
Route::group(array('domain'=>'{subdomain}.example.com'), function()
{
Route::group(array('before'=>array('authenticate')), function()
{
Route::resource('post', 'PostController');
Route::resource('comments', 'CommentsController');
Route::resource('forum', 'ForumController');
Route::resource('users', 'UsersController');
});
});
It seems that by default ALL my resource controllers are now taking the subdomain as first parameter and I can't find a way to change it.
If possible, I'd like to ignore the subdomain entirely.
Example use cases:
admin.example.com/forum/1?domain=foo
foo.example.com/forum/1
bar.example.com/forum/2
This site hosts 2 forums, but there is only 1 admin managing all of them. For admin to access the forum foo, admin must also supply domain=foo to look at it.
Route::group(array('domain'=>'admin.example.com')you can use the rule for admin separately beforeoute::group(array('domain'=>'{subdomain}.example.com')rule.