php artisan route:list is not listing the routes that I have created. I have tried php artisan route:clear, php artisan view:clear, php artisan config:clear, php artisan route:cache, php artisan optimize to make sure everything is clear. Have also tried composer dump-autoload .
This is my routes/api.php file. The /welcome and /debug routes are to debug, but even those are not showing up.
<?php
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Route;
use App\Http\Controllers\Api\ProductController;
use App\Http\Controllers\Api\TransactionController;
Route::get('/user', function (Request $request) {
return $request->user();
})->middleware('auth:sanctum');
Route::view('/welcome', 'welcome');
Route::get('/debug', function (Request $request) {
return 'Debugging!';
});
Route::apiResource('products', ProductController::class);
Route::apiResource('products.transactions', TransactionController::class);