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

Allows to configure routes #32

Open
jenky opened this issue Aug 9, 2019 · 4 comments
Open

Allows to configure routes #32

jenky opened this issue Aug 9, 2019 · 4 comments
Milestone

Comments

@jenky
Copy link

jenky commented Aug 9, 2019

Is your feature request related to a problem? Please describe.
The route paths and middleware can't be configured atm.

Describe the solution you'd like
Update config to support route path and middleware similar to laravel/telescope

@mattias-persson
Copy link
Contributor

Thanks for your request! Could you please provide a bit more detail on how you'd like it to work? Is it the API route prefix you'd like to change or the other routes?

@jenky
Copy link
Author

jenky commented Aug 9, 2019

I want to change the both route prefix and paths, apply my middleware. And also, I want to add my own logic since I dont want to use fully qualified class name for shoppable_type in order_items table so I'm using morphMap to customize polymorphic types, transform data to my desire response format. Ideally, I think you shouldn't register routes automatically. You could use the route macro to add your method i.e Route::cart() similar to Route::auth() from Laravel so developers can decide whether the route should be registered.

@mattias-persson
Copy link
Contributor

Right. I'll make the middleware and prefixes + paths configurable in the next release.

I'm currently working on a public API for managing the cart without using the REST API, when that's done I was planning on making the REST API optional. Is that what you meant?

@jenky
Copy link
Author

jenky commented Aug 9, 2019

Yes, please. Giving developers more power to do whatever they want

@mattias-persson mattias-persson added this to the 2.0 milestone Sep 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants