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

Custom prefix routes in RouteServiceProvider.php #887

Open
mhsilva555 opened this issue Jan 13, 2023 · 0 comments
Open

Custom prefix routes in RouteServiceProvider.php #887

mhsilva555 opened this issue Jan 13, 2023 · 0 comments

Comments

@mhsilva555
Copy link

I added a custom prefix to my api's routes. But the answer is always 404.

Code:

Route::prefix('api/v1')
->middleware('api')
->namespace($this->namespace)
->group(base_path('routes/api/v1/api.php'));

File Endpoints: routes/api/v1/api.php
Code:

Route::get('custom-endpoint', function () {
wp_send_json( 200 );
});

Return: Sorry, the page you are looking for could not be found

@mhsilva555 mhsilva555 changed the title Custom namespace routes in RouteServiceProvider.php Custom prefix routes in RouteServiceProvider.php Jan 13, 2023
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

1 participant