-
Notifications
You must be signed in to change notification settings - Fork 42
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
[Q] Shouldn't be 'index' the route name for the listing action of a HasMany relationship? #233
Comments
It's been that way for a long time now, no one has ever raised it! Not sure it causes any problems? |
I noticed because I get an error from my route() function in my front. It builds the endpoint URL by using the route name instead of the route path directly. |
I was automating/normalizing my http client in my Vue application and got confused when I got this inconsistency. 😅 |
Yeah sure, this could be tidied up. It'd need to be a major version release though, as it's potentially breaking if someone else is doing something along the lines of what you're doing with the route names. |
x.x Yes, it's a potential breaking change. But, it can be added a non-breaking (temporal) config option to replace this name, keeping the current value as default, so it will not be a BC and a normal feature release can be made, instead of a mayor release. |
I'm planning to do a major release the next time I do work on this package (probably mid-May onwards), so will just include it in that. |
I have in my route:
But the resulting route name is
api.v1.users.user-organizations
instead ofapi.v1.users.user-organizations.index
:Am I missing something, or it's OK?
How can I change it to have 'index' by default in all routes of this kind, instead of the "naked" route action?
The text was updated successfully, but these errors were encountered: