-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Route collector error when changing locale #11
Comments
Are you not using the service provider? What version exactly? 4.0.6, 4.0
|
4.0.7 it looks like. The service provider and facade are setup in my config/app.php, if that's what you mean. The debugbar is working, except with the scenario above. Route even works fine as long as I don't browse to myproject.localhost/fr or myproject.localhost/en (even with additional stuff on the URI). I suspect the issue stems from the fact that I remove the locale code from the route, but I'm too new to Laravel to know for sure. |
Okay, that is because there isn't an actual matching route for the locale link. I added a check instead of forcing the type, so it shouldn't produce an error anymore. 2 things though:
And 2': You don't have to setup the debugbar etc ( |
Confirmed this has resolved the issue. Thank you very much for putting together that example, but I'm not really concerned about SEO since this is an intranet app. |
I have a fairly simple way of switching locales by adding the language code to the beginning of the route. Then in my global before filter, I just grab segment(1) and deal with locale switching as applicable. I am using Laravel 4 (laravel/framework (4.0.x-dev b78c92d)).
Unfortunately, when the route collector is set to true, I receive the following error:
My global before filter:
I have the latest update as per composer and the package is installed using dev-master.
This is how I'm setting up Debugbar in my project:
and in the html:
Please let me know if you require any additional information.
The text was updated successfully, but these errors were encountered: