Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

dkmahore1031996@gmail.com's avatar

API Route is not found 404 Error

Api Route is Not Working . Web and Admin Route Working Properly.

We Checked RouteServiceProvider.php protected function mapApiRoutes() { Route::prefix('api') ->middleware('api') ->namespace($this->namespace) ->group(base_path('routes/api.php')); }

0 likes
1 reply
squibby's avatar

the api route is prefixed with /api are you using that in your request? Looks like its not found, because the endpoint you are requesting does not exist. What request are you making? List out all your routes with php artisan route:list if you need to and confirm its what you think it is....

Please or to participate in this conversation.