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

404 When trying to load Documentation #60

Open
Drewdan opened this issue Apr 21, 2021 · 0 comments
Open

404 When trying to load Documentation #60

Drewdan opened this issue Apr 21, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@Drewdan
Copy link

Drewdan commented Apr 21, 2021

Describe the bug

Not 100% sure this is a bug, more of a question. The package has routes which rely on the group for model route binding, however, in our application, we have a Route::bind on group which causes this to fail, and we get a 404 instead as it's binding to the wrong model.

To Reproduce

Steps to reproduce the behavior:
Bind the group name to another model in the RouteServiceProvider:

		Route::bind(
			'group',
			static function ($id) {
				return Group::with(['users'])->findOrFail($id);
			},
		);

Try to load some documentation, and you will get a 404

Expected behavior

Ideally, the documentation would still load, but this binding will override this.

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context

I am wondering if it would be a consideration of this package, to use a less common word instead of group, like docGroup to help prevent collisions like this, or if this would be something that you would think should be up to the person implementing this package to overcome?

@Drewdan Drewdan added the bug Something isn't working label Apr 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant