-
Notifications
You must be signed in to change notification settings - Fork 10.7k
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
Deep namespaced routes not working #8404
Comments
try to call |
It is, and when I call all those routes outside the namespace it works fine. Also, I noticed that the
Well this is very very weird because my application is already full of routes ... Most of them working |
OK. artisan isn't working because routes are included only of request segment is present (It is not in CLI mode) - I didn't notice it. Try to debug routes at the end of your dd($router->getRoutes()->getRoutes()); // Line correct - call getRoutes twice |
Very interesting debugging functionality ! One of the routes looks like that
And going to What do you think ? PS : i built a |
Here's the full
|
I'm not entirely sure about this, but I don't think routes are ever supposed to be registered conditionally. |
I've copied your codes into a fresh laravel installation and everything works. Does your middleware return |
So it's getting weird. My middleware does exactly this
I return So I removed it and it doesn't change anything to my routing problem. I'm starting to be worried not finding any solution :( Also, even if the routes aren't supposed to be registered conditionally, it's just a |
Your code definetly works - I've checked. Try to make a new fresh installation and copy your code step-by-step. |
If |
I'm building an international website, therefore I managed to have URLs looking like
/{language}/{other_stuff}
thank to some manipulation inRouteServiceProvider
Works like a charm. Every language will have his own route file, it's a choice.
Let's say we go to
/en/
and you're an admin, I created another namespace withinHttp/route_en.php
to focus on the admin section :So now I should access easily sections such as
/en/admin/brands
but it fails. I generate all my links dynamically thanks to the HTML classThe generation works fine when I go to
/en/admin
which meansAdmin\BrandsController@getIndex
is detected by this package, but when you click on itI tested some stuff and when I just simply set the route outside
group()
it works fine.What am I missing here ? Shouldn't the HTML class and the routing system agree with each others ? Is there any mistake I made ? Maybe there's an issue ?
The text was updated successfully, but these errors were encountered: