Skip to content

404 When trying to load Documentation #60

Description

@Drewdan

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions