I have my route files set up. I would like to use api routes and it was working previously, I don't know what caused it to go down. This is my api routes file.
Route::middleware('auth:sanctum')->get('/user', function (Request $request) {
return $request->user();
});
Route::post('/request-link', [RequestLinkController::class, '__invoke']);
Route::post('/statusUpdates', [StatusUpdateController::class, '__invoke']);
Route::post('/cancel-link', [CancelLinkController::class, '__invoke']);
Route::post('/retrieve-link', [HistoricalLinksController::class, '__invoke']);
Route::post('/refund-link', [RefundLinkController::class, '__invoke']);
Route::post('/merchant-refunds/confirm', [ConfirmRefundController::class, '__invoke']);
This is the error I'm getting on the api in postman:
"message": "The route api/refund-link could not be found.",
"exception": "Symfony\Component\HttpKernel\Exception\NotFoundHttpException",
"file": "/var/www/vendor/laravel/framework/src/Illuminate/Routing/AbstractRouteCollection.php",
"line": 44,
I've cleared the route cache to no avail. I've checked the rewrite module and it's on (the whole stuff is running on a container in docker).
The home view on the web is working.
Route::get('/', function () {
return view('welcome');
});
Route::get('/test', function () {
return view('welcome');
});
I've tried to add this second test route and I do get 404 on the web for it.
Do you have any idea why it is not working and how can I fix it?