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

Ability to register package routes in required place of the app #24

Open
DenTray opened this issue Nov 5, 2024 · 2 comments
Open

Ability to register package routes in required place of the app #24

DenTray opened this issue Nov 5, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@DenTray
Copy link
Collaborator

DenTray commented Nov 5, 2024

At the moment all package endpoints are registering automatically after package installation.

It good, but we can't wrap it into middlewares or modify prefixes.

Good solution to resolve it - will be implement some kind of helper which will register routes in required place.

As a reference - we can implement the same logic as Laravel providing in Auth::routes() method.

It also will be very helpful if the package will automatically determine whether he should register routes automatically (if a helper didn't call) or not.

@DenTray DenTray added the enhancement New feature or request label Nov 5, 2024
@RGO230
Copy link
Contributor

RGO230 commented Nov 18, 2024

@DenTray, done please check

@DenTray DenTray assigned DenTray and unassigned RGO230 Nov 19, 2024
@DenTray
Copy link
Collaborator Author

DenTray commented Nov 21, 2024

@RGO230 not works correctly for me

I've registered routes in my guest group

image

Package routes stopping works for the default paths

image

But it now works for my path (actually I've set only delete endpoint type)

image

I've also imagine that it would be better to use Enum for setting routes type as we can use type hints in this case

image

@DenTray DenTray assigned RGO230 and unassigned DenTray Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants