enhanced-router
enhanced-router copied to clipboard
Filter on Group Domain Route is eating the dyanimc url variable
I have a controller route defined no group and it works fine.
Route::controller('users', 'UserController');
Here is the method signature
public function getShow($id) {
When I add this Route Group with a filter the $id variable does not get passed in anymore.
Route::group(array('domain' => '{domain}'), function()
{
Route::controller('users', 'UserController');
})->where('domain', '(local.mydomain.com|mydomain.elasticbeanstalk.com)');
The route group with the where is working working fine. It just eats the $id variable and doesn't pass it into the getShow($id) method anymore.
I got the same issue when trying to use the group with prefix => "{locale}". Then I have a URL like /messages/1 where 1 is the {id}, but {locale} will be parsed in instead of id, so it is like I would call /messages/en (for instance), which really doesn't make any kind of sense.
I have a doubt.
imagine instead of locale, lets consider 'id'. Id is unique identification for users in users table, model.
how should i use ->where('id', 'all id in model user');