Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filter on Group Domain Route is eating the dyanimc url variable #18

Open
csavory opened this issue Dec 13, 2013 · 2 comments
Open

Filter on Group Domain Route is eating the dyanimc url variable #18

csavory opened this issue Dec 13, 2013 · 2 comments

Comments

@csavory
Copy link

csavory commented Dec 13, 2013

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.

@marvin-w
Copy link

marvin-w commented Feb 7, 2014

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.

@joicemjoseph
Copy link

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');

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants